pg_restore ignores PGDATABASE

Erik Rijkers <er@xs4all.nl>

From: "Erik Rijkers" <er@xs4all.nl>
To: pgsql-hackers@postgresql.org
Date: 2012-02-18T16:58:19Z
Lists: pgsql-hackers
pg_restore ignores environment variable PGDATABASE.

Is this intentional?  (perhaps because of the risk of restoring into the wrong db?)

I would prefer if it would honor the PGDATABASE variable, but if it does ignore it intentionally,
the following (from 9.2devel docs) is obviously incorrect:

"This utility, like most other PostgreSQL utilities, also uses the environment variables supported
by libpq (see Section 31.13)."

I could look into fixing one (binary) or the other (docs), but what /is/ the preferred behavior?


thanks,


Erik Rijkers