Re: How to drop sequence? - Mailing list pgsql-general

From Tom Lane
Subject Re: How to drop sequence?
Date
Msg-id 18702.1078185554@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to drop sequence?  (Ron St-Pierre <rstpierre@syscor.com>)
List pgsql-general
Ron St-Pierre <rstpierre@syscor.com> writes:
> Does anyone know if this is the way this is supposed
> to work,

Yes it is.  The fact that there is a sequence involved in a SERIAL
column is really an implementation detail that you're not supposed to
muck with.  Thus the dependency is on the column itself; drop the column
if you want to make the sequence go away.

(There should probably be some defense against letting you mess with the
column default expression, too, but we don't have one at the moment.)

If this isn't how you'd like things to work, don't use the SERIAL
shorthand.  Create the sequence yourself.

            regards, tom lane

pgsql-general by date:

Previous
From: "Kuldeep Tanna"
Date:
Subject: How to Cancel a query ?
Next
From: "Keith Bottner"
Date:
Subject: Re: Setting up Postgresql on Linux