pg_dump - option for just dumping sequences?

From: Justin Clift <jc(at)telstra(dot)net>
To: PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dump - option for just dumping sequences?
Date: 2004-07-16 03:52:21
Message-ID: 40F750F5.2060005@telstra.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Came across a scenario today where I want to backup the latest values of
sequences in the database, so they can be restored along with the data
from a COPY command.

Looked at pg_dump's output options (for 7.4/7.5) and there doesn't seem
to be an easy way for just dumping sequence definitions (with the latest
sequence numbers).

Thought about using egrep too, but had difficulties there too.

Does anyone else think it would be a useful thing adding an option to
pg_dump for outputting just the sequences?

Or perhaps there's an easy way of doing this I just haven't thought of?

:-)

Regards and best wishes,

Justin Clift

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Glaesemann 2004-07-16 03:58:52 Converting epoch to timestamp
Previous Message Tom Lane 2004-07-16 03:49:04 Re: Point in Time Recovery