brianc/node-postgres — pull request #606 by gurjeet (2014-06-15 20:17:50+00:00)
Title: Fix 2 bugs in connection-parameters, and use environment vars consistently.

Bug 1: There's no such environment variable PGBINARY honored by
Postgres, but the code accidently honored such a variable, if present,
even though there's no support for binary format, yet.

Bug 2: Code, again by accident, honored PGCLIENT_ENCODING environment
variable, whereas there's no such variable honored by Postgres' libpq.
Corrected it to use PGCLIENTENCODING instead.

Since the above two mistakes were purely because of the way var()
function is coded to assume the env variable name to be equivalent of
'PG'+passed_in_key, it's easy to see how easy it is to make such
mistakes in future. So I consistently specify the env variable name,
even though the above mentioned derivation works just fine for most
keys.

Also, it seems odd to return a boolean false from val() function, so I
changed the code to return an empty string instead. Would it have been
better to return null or undefined?