Skip to content

Commit f25ffa9

Browse files
default database name depends on $PGUSER first, then $USER
If I get this right, the spot in the code to know for that is https://github.com/brianc/node-postgres/blob/947ccee346f0d598e135548e1e4936a9a008fc6f/packages/pg/lib/connection-parameters.js#L9
1 parent 2e179fc commit f25ffa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/api/2-client.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ config = {
1414
user?: string, // default process.env.PGUSER || process.env.USER
1515
password?: string or function, //default process.env.PGPASSWORD
1616
host?: string, // default process.env.PGHOST
17-
database?: string, // default process.env.PGDATABASE || process.env.USER
17+
database?: string, // default process.env.PGDATABASE || process.env.PGUSER || process.env.USER
1818
port?: number, // default process.env.PGPORT
1919
connectionString?: string, // e.g. postgres://user:password@host:5432/database
2020
ssl?: any, // passed directly to node.TLSSocket, supports all tls.connect options

0 commit comments

Comments
 (0)