pg_dump-ing tables and their sequences - Mailing list pgsql-general

From Michael Adler
Subject pg_dump-ing tables and their sequences
Date
Msg-id Pine.NEB.4.44.0203251251090.16928-100000@reva.sixgirls.org
Whole thread Raw
In response to Re: accessing fully qualified fields in records in PLPGSQL?  (Darren Ferguson <darren@crystalballinc.com>)
List pgsql-general
I'm tracking development by storing pg_dumps in CVS. This is pretty handy.
I even have a script that makes diffs of the versions to help us write
upgrade patches. If anyone has hints or wants build a general solution for
this type of thing, I'm interested.


The problem is this:

We create two tables, each with implicit SEQUENCES by using the SERIAL datatype.

Then:

pg_dump --schema --table=sometable databasename
pg_dump --schema --table=anothertable databasename

The output for sometable includes the "CREATE SEQUENCE
sometable_column_seq" statment, but the output for anothertable does not.
It only referes to that sequence in the column type nextval statement.

How can I reliably pg_dump the sequence with the table?

Mike Adler


pgsql-general by date:

Previous
From: "Thomas F. O'Connell"
Date:
Subject: Re: logging all queries in 7.1.3
Next
From: Neil Conway
Date:
Subject: Re: Another notify question