Re: Bug #699: pg_dump not reporting correct start value for sequence

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: martin(at)myinternet(dot)com(dot)au, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #699: pg_dump not reporting correct start value for sequence
Date: 2002-06-26 13:53:34
Message-ID: 1897.1025099614@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pgsql-bugs(at)postgresql(dot)org writes:
> This causes problems for me as I use the dump to check if the schema is up to date.

Then don't do that, or more accurately try looking at the setval not the
CREATE SEQUENCE.

The START value of a sequence isn't saved anywhere; it's merely the
initial value of the running counter, and so pg_dump cannot reliably
reconstruct it for you. I do not consider this a bug. pg_dump's
charter is to reproduce the database state when the script is reloaded,
and it does so.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alfredo 2002-06-26 14:31:50 Please I want to unsusribe me from this list
Previous Message pgsql-bugs 2002-06-26 07:33:25 Bug #699: pg_dump not reporting correct start value for sequence