From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Joachim Wieland <joe(at)mcknight(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, nikolay(at)samokhvalov(dot)com, PostgreSQL-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Sequences/defaults and pg_dump |
Date: | 2006-02-09 03:57:20 |
Message-ID: | 200602090357.k193vK412147@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Joachim Wieland wrote:
> On Wed, Feb 08, 2006 at 09:03:54AM -0500, Bruce Momjian wrote:
> > Joachim Wieland wrote:
> > > On Tue, Feb 07, 2006 at 09:49:02AM -0500, Bruce Momjian wrote:
> > > > > The correct solution to this is to forbid ALTER COLUMN SET DEFAULT on
> > > > > a serial column, but we haven't gotten around to enforcing that yet.
>
> > > > TODO has:
>
> > > > * %Disallow changing default expression of a SERIAL column
>
> > > This should go along with another command like
>
> > > ... ALTER COLUMN DROP SERIAL
>
> > > which drops the serial and removes the dependencies to get rid of it in a
> > > clean way, right?
>
> > Uh, you can drop a column or change its data type, but not drop the data
> > type of a column.
>
> Sure, the "DROP SERIAL" I proposed would rather "change" the data type
> to int by dropping the default and would delete referring pg_depend entries.
> Read it more as a kind of "drop autoincrement functionality for this
> column".
>
> The problem I see (but you might see it differently) is that you can't drop
> this autoincrement stuff without also dropping the column once you forbid to
> change the default (yeah I know, changing the default is even worse and
> leaves you with incorrect dependencies).
I assume an ALTER COLUMN ... TYPE INTEGER would drop the SERIAL part.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Karl O. Pinc | 2006-02-09 04:27:30 | Re: Request to have VACUUM ignore cost based limits |
Previous Message | Chris | 2006-02-09 03:49:52 | Re: What's faster? |
From | Date | Subject | |
---|---|---|---|
Next Message | David Tulloh | 2006-02-09 04:16:22 | Feature request - Add microsecond as a time unit for interval |
Previous Message | Bruce Momjian | 2006-02-09 03:53:44 | Re: Audio interview |