Re: Sequences/defaults and pg_dump - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Sequences/defaults and pg_dump
Date
Msg-id 200602071449.k17En2e18501@candle.pha.pa.us
Whole thread Raw
In response to Re: Sequences/defaults and pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Sequences/defaults and pg_dump  (Joachim Wieland <joe@mcknight.de>)
List pgsql-general
Tom Lane wrote:
> Nikolay Samokhvalov <samokhvalov@gmail.com> writes:
> > testseq=# CREATE TABLE test(id SERIAL, data TEXT);
> > NOTICE:  CREATE TABLE will create implicit sequence "test_id_seq" for
> > serial column "test.id"
> > CREATE TABLE
> > ***
> > ALTER TABLE test ALTER COLUMN id SET DEFAULT nextval('test_id_seq') * 10;
>
> 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

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: "Flavio Basile"
Date:
Subject: Commercial Use
Next
From: Bruce Momjian
Date:
Subject: Re: Commercial Use