Обсуждение: pgsql-server: Fix oversight in recent ALTER TABLE improvements.

Поиск
Список
Период
Сортировка

pgsql-server: Fix oversight in recent ALTER TABLE improvements.

От
tgl@svr1.postgresql.org (Tom Lane)
Дата:
Log Message:
-----------
Fix oversight in recent ALTER TABLE improvements.  We now support
ALTER TABLE tab ADD COLUMN col SERIAL, but we forgot to install the
dependency between the column and the sequence, so the sequence
would not go away if you dropped the table later.

Modified Files:
--------------
    pgsql-server/src/backend/commands:
        tablecmds.c (r1.113 -> r1.114)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/commands/tablecmds.c.diff?r1=1.113&r2=1.114)

Re: pgsql-server: Fix oversight in recent ALTER TABLE

От
Christopher Kings-Lynne
Дата:
> Fix oversight in recent ALTER TABLE improvements.  We now support
> ALTER TABLE tab ADD COLUMN col SERIAL, but we forgot to install the
> dependency between the column and the sequence, so the sequence
> would not go away if you dropped the table later.

What if you ALTER TABLE / TYPE SERIAL?

Chris


Re: pgsql-server: Fix oversight in recent ALTER TABLE

От
Tom Lane
Дата:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>> Fix oversight in recent ALTER TABLE improvements.  We now support
>> ALTER TABLE tab ADD COLUMN col SERIAL, but we forgot to install the
>> dependency between the column and the sequence, so the sequence
>> would not go away if you dropped the table later.

> What if you ALTER TABLE / TYPE SERIAL?

You can't --- it won't recognize the SERIAL alias in that context.

            regards, tom lane