Re: Sequences/defaults and pg_dump

From: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
To: PostgreSQL-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Sequences/defaults and pg_dump
Date: 2006-02-07 15:13:14
Message-ID: e431ff4c0602070713g1b393b68u20765859600a4e50@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 2/7/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.
That's wrong!
Forget about SERIAL. I have INTEGER column with some expression as
DEFAULT in it. I use sequence in that expression and want this to be
dumped correctly.
The bug doesn't concerns SERIALs, in concerns general usage of sequences.
>
> regards, tom lane
>

--
Best regards,
Nikolay

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-02-07 15:13:56 Re: Clarification Regarding Vacuum and template1
Previous Message Ludwig Isaac Lim 2006-02-07 15:05:23 Clarification Regarding Vacuum and template1

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-02-07 15:18:57 Re: streamlined standby procedure
Previous Message Csaba Nagy 2006-02-07 15:11:07 streamlined standby procedure