Re: Backup and restore sequences

Поиск
Список
Период
Сортировка
От Alan Hodgson
Тема Re: Backup and restore sequences
Дата
Msg-id 201101070811.03400@hal.medialogik.com
обсуждение исходный текст
Ответ на Backup and restore sequences  (gvim <gvimrc@gmail.com>)
Список pgsql-general

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

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Backup and restore sequences
Следующее
От: Bernhard Rohrer
Дата:
Сообщение: OOO and postgres