On Wed, Feb 08, 2006 at 10:57:20PM -0500, Bruce Momjian wrote:
> > > > > TODO has:

> > > > >       * %Disallow changing default expression of a SERIAL 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.

So far it doesn't because it doesn't know the difference between serial
and int.

What about this proposal for serial columns:

- DROP DEFAULT  drops serial and removes dependencies
- SET DEFAULT   forbidden, issues a hint to DROP DEFAULT first


Is it also desired to convert an int column to a serial column?


(moving to -hackers)

Joachim

-- 
Joachim Wieland                                              [EMAIL PROTECTED]
C/ Usandizaga 12 1°B                                           ICQ: 37225940
20002 Donostia / San Sebastian (Spain)                     GPG key available

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to