Re: pg_restore usage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore usage
Дата
Msg-id 11767.1088346148@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_restore usage  (tfo@alumni.brown.edu (Thomas F. O'Connell))
Ответы Asunto: Re: pg_restore usage  (juanmime@ono.com)
Список pgsql-admin
tfo@alumni.brown.edu (Thomas F. O'Connell) writes:
> I transfer this file to another server, where the database db does not
> exist. I try the following:

> pg_restore -C -d db pg_dump20040621.pgsql
> pg_restore: [archiver (db)] connection to database "db" failed: FATAL:
>  database "db" does not exist

> What is an example of how the -C flag is intended to be used?

Whatever database you name in -d has to already exist, because that's
where pg_restore will initially connect.  -C means to issue a CREATE
DATABASE command and then reconnect to the new db.

In other words, try "-C -d template1".

            regards, tom lane

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

Предыдущее
От: tfo@alumni.brown.edu (Thomas F. O'Connell)
Дата:
Сообщение: pg_restore usage
Следующее
От: reina_ga@hotmail.com (Tony Reina)
Дата:
Сообщение: Password with libpq