From: | Alan Hodgson <ahodgson(at)simkin(dot)ca> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Backup and restore sequences |
Date: | 2011-01-07 16:11:02 |
Message-ID: | 201101070811.03400@hal.medialogik.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On January 7, 2011, gvim <gvimrc(at)gmail(dot)com> wrote:
> PostgreSQL 9.0.1/pgAdminIII 1.12.1
>
> I want to copy selected tables from one database to another and maintain
> the sequences which I originally setup with:
>
> CREATE SEQUENCE venues_id_seq START WITH 1122;
> ALTER TABLE venues ALTER COLUMN id SET DEFAULT nextval('venues_id_seq');
>
> ... along with their current values, which have been augmented since the
> database was setup. When I backup via pgAdminIII the sequences are not
> even included. I also can't find anything in:
>
> man pg_dump
>
> ... which specifies sequences.
>
> gvim
--table=table
Dump only tables (or views or sequences) matching table.
Multiple tables can be selected
by writing multiple -t switches. Also, the table parameter
is interpreted as a pattern
according to the same rules used by psql’s \d commands (see
Patterns [psql(1)]), so multi-
ple tables can also be selected by writing wildcard
characters in the pattern. When using
wildcards, be careful to quote the pattern if needed to
prevent the shell from expanding
the wildcards.
--
A hybrid Escalade is missing the point much in the same way that having a
diet soda with your extra large pepperoni pizza is missing the point.
From | Date | Subject | |
---|---|---|---|
Next Message | Bernhard Rohrer | 2011-01-07 17:40:50 | OOO and postgres |
Previous Message | Adrian Klaver | 2011-01-07 15:58:47 | Re: Backup and restore sequences |