Re: Sequences/defaults and pg_dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nikolay(at)samokhvalov(dot)com
Cc: PostgreSQL-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Sequences/defaults and pg_dump
Date: 2006-02-07 14:43:34
Message-ID: 6664.1139323414@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Nikolay Samokhvalov <samokhvalov(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2006-02-07 14:49:02 Re: Sequences/defaults and pg_dump
Previous Message Richard Huxton 2006-02-07 14:23:35 Re: Installation of PostGIS

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-02-07 14:49:02 Re: Sequences/defaults and pg_dump
Previous Message Martijn van Oosterhout 2006-02-07 13:12:45 Re: Sequences/defaults and pg_dump