Re: Patch for bug #2073 (Can't drop sequence when created via SERIAL column) - Mailing list pgsql-patches

From Tom Lane
Subject Re: Patch for bug #2073 (Can't drop sequence when created via SERIAL column)
Date
Msg-id 3350.1144725239@sss.pgh.pa.us
Whole thread Raw
In response to Patch for bug #2073 (Can't drop sequence when created via SERIAL column)  (Dhanaraj M - Sun Microsystems <dhanaraj.m@mail-apac.sun.com>)
Responses Re: Patch for bug #2073 (Can't drop sequence when created  (Dhanaraj M - Sun Microsystems <dhanaraj.m@mail-apac.sun.com>)
List pgsql-patches
Dhanaraj M - Sun Microsystems <dhanaraj.m@mail-apac.sun.com> writes:
> I fixed the above bug. I attach the patch here. Please review and
> acknowledge me.

> Bug details
> ========
> BUG #2073: Can't drop sequence when created via SERIAL column

That isn't a bug, and this "fix" is not appropriate.  See eg Bruce's
response to that bug report:
http://archives.postgresql.org/pgsql-bugs/2005-11/msg00304.php

I speculated a bit ago (can't find it in the archives at the moment)
that we should abandon the hidden dependency altogether, and go back to
having SERIAL just create the sequence and the default expression.
Another idea that might be worth exploring is to link the sequence to
the default expression rather than to the table column itself.  But
randomly dropping the dependency is not the answer.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: schema-qualified SET CONSTRAINTS
Next
From: Bruce Momjian
Date:
Subject: Re: Patch proposal for log_duration