pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Charles <c@charlesmatkinson.org>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-docs@postgresql.org
Subject: Re: pg_restore man page (version 9.4) > -d/dbname clarification request
Date: Fri, 16 Jun 2017 10:39:44 +0530
Message-ID: <c5a5fe67-d142-803a-f526-6652ae9e9d83@charlesmatkinson.org> (raw)
In-Reply-To: <59edd1d1-ecde-3cf4-1ca5-b18a81573e98@2ndquadrant.com>
References: <bf2f6656-6ec1-ff4d-d2de-1149aa8f3da4@charlesmatkinson.org>
	<59edd1d1-ecde-3cf4-1ca5-b18a81573e98@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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@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



-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



view thread (5+ messages)  latest in thread

Message-ID: <c5a5fe67-d142-803a-f526-6652ae9e9d83@charlesmatkinson.org>
Permalink:  ../c5a5fe67-d142-803a-f526-6652ae9e9d83@charlesmatkinson.org/
Also on:    postgresql.org/message-id/c5a5fe67-d142-803a-f526-6652ae9e9d83@charlesmatkinson.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-docs@postgresql.org
  Cc: c@charlesmatkinson.org, peter.eisentraut@2ndquadrant.com
  Subject: Re: pg_restore man page (version 9.4) > -d/dbname clarification request
  In-Reply-To: <c5a5fe67-d142-803a-f526-6652ae9e9d83@charlesmatkinson.org>
  References: <bf2f6656-6ec1-ff4d-d2de-1149aa8f3da4@charlesmatkinson.org> <59edd1d1-ecde-3cf4-1ca5-b18a81573e98@2ndquadrant.com> <c5a5fe67-d142-803a-f526-6652ae9e9d83@charlesmatkinson.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox