Re: Is this a bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is this a bug?
Date: 2005-01-25 17:59:26
Message-ID: 5185.1106675966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Matthew T. O'Connor" <matthew(at)zeut(dot)net> writes:
> Now, I know I can specify a constraint name inside the alter command,
> but I still expected this to work.

It does, in 8.0.

regression=# create table foo (id1 int, id2 int, id3 int);
CREATE TABLE
regression=# ALTER TABLE foo ADD unique (id1,id2);
NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "foo_id1_key" for table "foo"
ALTER TABLE
regression=# ALTER TABLE foo ADD unique (id1,id3);
NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "foo_id1_key1" for table "foo"
ALTER TABLE
regression=#

Of course there's no free lunch: it's significantly harder to guess what
the index name will be...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Fuhr 2005-01-25 18:00:32 Re: Is this a bug?
Previous Message Matthew T. O'Connor 2005-01-25 17:44:04 Re: Goals for 8.1