Re: [SQL] An easy question about creating a primary key

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: [SQL] An easy question about creating a primary key
Дата
Msg-id GNELIHDDFBOCMGBFGEFOCEKHCAAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответы Re: [SQL] An easy question about creating a primary key  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> I think you've forgotten your own work, Chris.
>
> regression=# create table foo (bar int not null);
> CREATE
> regression=# alter table foo add primary key (bar);
> NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index
> 'foo_pkey' for table 'foo'
> CREATE
> regression=#

Bizarre.  That patch was never committed.  If you check
src/backend/commands/command.c and search for 'CONSTR_' you'll notice that
the CONSTR_UNIQUE function I implemented is there, but CONSTR_PRIMARY is
definitely not being handled.  (I'm looking at the 7.2b2 source code)

Chris



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

Предыдущее
От: Manuel Cabido
Дата:
Сообщение: Re: date formatting and tab-complete patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] An easy question about creating a primary key