Search Postgresql Archives

Re: Sequences/defaults and pg_dump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).


Joachim

-- 
Joachim Wieland                                              joe@xxxxxxxxxxx
C/ Usandizaga 12 1°B                                           ICQ: 37225940
20002 Donostia / San Sebastian (Spain)                     GPG key available


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux