Re: [GENERAL] pg_restore to a port where nobody is listening? - Mailing list pgsql-general

From Daniel Westermann
Subject Re: [GENERAL] pg_restore to a port where nobody is listening?
Date
Msg-id 1386537225.4486856.1482391256079.JavaMail.zimbra@dbi-services.com
Whole thread Raw
In response to Re: [GENERAL] pg_restore to a port where nobody is listening?  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-general
>It isn't consistent but it's by purpose. And there's a really good reason for that behaviour. There's no issue with psql connecting to a >default database because psql doesn't do anything by itself. pg_restore will do something to the database it connects to. It might drop >some objects, create some, add data. I want to be sure it's restored in the right database. I don't want it to second-guess what I want to >do. Otherwise, I'll have a really hard time fixing everything it did. So -d is required by pg_restore to connect to some database, >whereas there's no big deal with psql connecting to a default database.

Ok, makes sense. Thanks all for your answers

Regards
Daniel

pgsql-general by date:

Previous
From: Tom DalPozzo
Date:
Subject: Re: [GENERAL] error updating a tuple after promoting a standby
Next
From: Francisco Olarte
Date:
Subject: Re: [GENERAL] Disabling inheritance with query.