On Sat, Mar 12, 2016 at 04:17:07PM -0500, Melvin Davidson wrote:

> BTW, other than the obvious of including the name in path or file, if you
> are referring to previous/existing dumps

I do.

> grep -i some_dump_file 'CREATE DATABASE'

That will not work (directly) because the dump is in
directory format.

> If nothing is found, then the dump can be applied to ANY database.

Since one can create an SQL dump from the directory dump the
above becomes possible by appropriate use of

        pg_restore -C ... | grep CREATE DATABASE

This is, indeed, the option (after pg_restore -l | grep ...)
I consider least fragile.

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


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

Reply via email to