From: | Charles <c(at)charlesmatkinson(dot)org> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: pg_restore man page (version 9.4) > -d/dbname clarification request |
Date: | 2017-06-16 05:09:44 |
Message-ID: | c5a5fe67-d142-803a-f526-6652ae9e9d83@charlesmatkinson.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On 15/06/17 20:48, Peter Eisentraut wrote:
> On 6/15/17 00:00, Charles wrote:
>> Please consider changing "Connect to database dbname and restore
>> directly into the database" to "Connect to database dbname and restore
>> directly into the database named in the input file"
>
> But that's not what it does.
>
Thank you Peter
I am new to postgres so can easily be wrong.
The suggestion was based on how pg_restore behaved when used this way
(as user postgres on a Debian Jessie server):
$ dropdb redmine_default
$ pg_restore --create --dbname=postgres
redmine_default-2017-06-11(at)18\:21\:06.sql
The .sql file had been created on another server using:
pg_dump --format=custom --lock-wait-timeout=6000000 --username=postgres
--no-password redmine_default
After running the pg_restore command the redmine_default was populated.
Given that database redmine_default was not named on the pg_restore
command I concluded that its name must have been found in the .sql file.
Best, Charles
From | Date | Subject | |
---|---|---|---|
Next Message | manish.kumar | 2017-06-16 08:52:58 | store procedure |
Previous Message | Bruce Momjian | 2017-06-15 17:28:52 | Re: [GENERAL] pg_upgrade --link on Windows |