From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PROPOSAL] Covering + unique indexes. |
Date: | 2015-09-15 11:20:18 |
Message-ID: | 55F7FEF2.7010108@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 Btree only
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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Vik Fearing | 2015-09-15 11:24:47 | Re: [PROPOSAL] Covering + unique indexes. |
Previous Message | David Rowley | 2015-09-15 11:01:25 | Re: [PROPOSAL] Covering + unique indexes. |