From: | Daniel Westermann <daniel(dot)westermann(at)dbi-services(dot)com> |
---|---|
To: | Guillaume Lelarge <guillaume(at)lelarge(dot)info>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: pg_restore to a port where nobody is listening? |
Date: | 2016-12-22 07:20:56 |
Message-ID: | 1386537225.4486856.1482391256079.JavaMail.zimbra@dbi-services.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Olarte | 2016-12-22 08:49:04 | Re: Disabling inheritance with query. |
Previous Message | Tom DalPozzo | 2016-12-22 07:09:52 | Re: error updating a tuple after promoting a standby |