Re: Is this a bug?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is this a bug?
Дата
Msg-id 5185.1106675966@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is this a bug?  ("Matthew T. O'Connor" <matthew@zeut.net>)
Список pgsql-hackers
"Matthew T. O'Connor" <matthew@zeut.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Is this a bug?
Следующее
От: Greg Stark
Дата:
Сообщение: strxfrm implementation