Search Postgresql Archives

Re: Backup and restore sequences

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On January 7, 2011, gvim <gvimrc@xxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux