pg_dump-ing tables and their sequences

Поиск
Список
Период
Сортировка
От Michael Adler
Тема pg_dump-ing tables and their sequences
Дата
Msg-id Pine.NEB.4.44.0203251251090.16928-100000@reva.sixgirls.org
обсуждение исходный текст
Ответ на Re: accessing fully qualified fields in records in PLPGSQL?  (Darren Ferguson <darren@crystalballinc.com>)
Список 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 по дате отправления:

Предыдущее
От: "Thomas F. O'Connell"
Дата:
Сообщение: Re: logging all queries in 7.1.3
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Another notify question