You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's this example with an inaccurate comment in readme:
constsql=postgres({ ...options})// will default to the same as psql
In psql, if you omit database name, it defaults to user name. So psql -U dummy connects to database dummy, and PGUSER=funny psql connects to database funny.
pg (node-postgres) mimics this behaviour
With this module, if you don't set PGDATABASE in env or the corresponding option, it always connects to database postgres, ignoring PGUSER var.
The text was updated successfully, but these errors were encountered:
Minor issue that caused me some head scratches.
There's this example with an inaccurate comment in readme:
In
psql
, if you omit database name, it defaults to user name. Sopsql -U dummy
connects to databasedummy
, andPGUSER=funny psql
connects to databasefunny
.pg (node-postgres)
mimics this behaviourWith this module, if you don't set
PGDATABASE
in env or the corresponding option, it always connects to databasepostgres
, ignoringPGUSER
var.The text was updated successfully, but these errors were encountered: