Re: [HACKERS] [GENERAL] Sequences/defaults and pg_dump

2006-02-09 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> The only thing we'd lose is that dropping a column >> originally declared as serial wouldn't implicitly drop the sequence. > Wasn't that the primary purpose that the main coder for dependencies did > the work for? My recollection is

Re: [HACKERS] [GENERAL] Sequences/defaults and pg_dump

2006-02-09 Thread Alvaro Herrera
Tom Lane wrote: > The only thing we'd lose is that dropping a column > originally declared as serial wouldn't implicitly drop the sequence. Wasn't that the primary purpose that the main coder for dependencies did the work for? AFAIR the fact that the sequence wasn't dropped was a big gotcha. Ev

Re: [HACKERS] [GENERAL] Sequences/defaults and pg_dump

2006-02-09 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> If we are going to do something like that, I think we should take a hard >> look at the idea I floated of putting SERIAL back to a pure >> creation-time macro for type and default expression. This is getting to >> have way too much hidden behavior, and w

Re: [HACKERS] [GENERAL] Sequences/defaults and pg_dump

2006-02-09 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > >> Is it also desired to convert an int column to a serial column? > > > I think the only sane solution is if a SERIAL column is changed to > > INTEGER, the default and dependencies are removed. Do you want a TODO > > for that? > > If we are going to do

Re: [HACKERS] [GENERAL] Sequences/defaults and pg_dump

2006-02-09 Thread Tom Lane
Bruce Momjian writes: >> Is it also desired to convert an int column to a serial column? > I think the only sane solution is if a SERIAL column is changed to > INTEGER, the default and dependencies are removed. Do you want a TODO > for that? If we are going to do something like that, I think we

Re: [HACKERS] [GENERAL] Sequences/defaults and pg_dump

2006-02-09 Thread Bruce Momjian
Joachim Wieland wrote: > 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 de

Re: [HACKERS] [GENERAL] Sequences/defaults and pg_dump

2006-02-09 Thread Joachim Wieland
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