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

Started by Tom Laneabout 22 years ago3 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

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)

#2Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Tom Lane (#1)
Re: pgsql-server: Fix oversight in recent ALTER TABLE

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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#2)
Re: pgsql-server: Fix oversight in recent ALTER TABLE

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