From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Rod Taylor <rbt(at)zort(dot)ca> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Unique and Primary Key Constraints |
Date: | 2002-07-13 14:29:28 |
Message-ID: | 200207131429.g6DETSM21306@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Rod Taylor wrote:
> > > I prefer ...add constraint. After a while (release or 2) removal of
> > > create unique index all together.
> >
> > Remove CREATE UNIQUE INDEX entirely? Why?
>
> I was looking to encourage users to use core SQL as I spend more time
> than I want converting between systems -- thanks in part to users who
> create non-portable structures.
>
> Temporarily forgot there are index types other than btree :)
Not so much non-btree, but non-unique indexes themselves. UNIQUE index
is funny because it is a constraint and an performance utility. I see
your point that a constraint is more ANSI standard, but because we can't
get rid of non-unique indexes, I am not sure if there is really a good
reason to move to UNIQUE constraints. Well, it does make the table
definition and index more compact (one statement) but we split them up
on pg_dump so we can load the table without the index, so it doesn't
seem to be a win.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2002-07-13 14:32:50 | Re: CHAR constants |
Previous Message | Tom Lane | 2002-07-13 14:27:44 | Re: Memo on dropping practices |