| From: | Brendan Jurd <direvus(at)gmail(dot)com> |
|---|---|
| To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: WIP: generalized index constraints |
| Date: | 2009-07-16 23:51:56 |
| Message-ID: | 37ed240d0907161651s7c70f64fn1f7eedd4f9441dd0@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
2009/7/17 Jeff Davis <pgsql(at)j-davis(dot)com>:
> Another idea that I thought about is that:
>
> ALTER TABLE foo ADD UNIQUE (a, b) USING foo_idx;
>
> could be a shorthand for:
>
> ALTER TABLE foo ADD INDEX CONSTRAINT (a =, b =) USING foo_idx;
>
> The benefit is that it could go over GiST indexes or hash indexes, not
> just btrees. The syntax could also be useful to turn an existing btree
> into a unique btree.
I like that idea ... although how would this interact (if at all) with
the existing pg_index.isunique flag? Would it become deprecated in
favour of using indconstrats, or would you actually look at switching
isunique to TRUE if somebody applies a constraint which is made up
entirely of equality ops?
Cheers,
BJ
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Brendan Jurd | 2009-07-17 00:07:31 | Re: Docbook toolchain interfering with patch review? |
| Previous Message | Andrew Dunstan | 2009-07-16 23:40:00 | Re: Docbook toolchain interfering with patch review? |