Re: [PROPOSAL] Covering + unique indexes. - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: [PROPOSAL] Covering + unique indexes.
Date
Msg-id 55F7FEF2.7010108@sigaev.ru
Whole thread Raw
In response to Re: [PROPOSAL] Covering + unique indexes.  (Anastasia Lubennikova <a.lubennikova@postgrespro.ru>)
List pgsql-hackers
Seems, final form is

CREATE INDEX idx ON tbl (f1, f2, f3) [UNIQUE ON (f1, f2)] [INCLUDE (f4)]

f1, f2, f3 are participated in index row comparence (btre, gist etc)
f1, f2 are participated in unique constrain and it gives warranty for   (f1, f2, f3[, f4]) uniqueness. Now supported by
Btreeonly
 
f4 doesn't participate in row comparence and could even do not have an operator   class. Btree and GiST could support
that.

The form
CREATE UNIQUE INDEX ON tbl  (f1, f2, f3)
is exact equivalent of form
CREATE INDEX idx ON tbl (f1, f2, f3) UNIQUE ON (f1, f2, f3)

I hope, that it's doible without a lot of difficulties.
-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: [PROPOSAL] Covering + unique indexes.
Next
From: Vik Fearing
Date:
Subject: Re: [PROPOSAL] Covering + unique indexes.