File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -382,6 +382,7 @@ function parseOptions(url, options = {}) {
382
382
const env = process . env // eslint-disable-line
383
383
384
384
options = Object . assign ( {
385
+ connection : { } ,
385
386
host : env . PGHOST || 'localhost' ,
386
387
port : env . PGPORT || 5432 ,
387
388
database : env . PGDATABASE || 'postgres' ,
@@ -405,6 +406,9 @@ function parseOptions(url, options = {}) {
405
406
options . database = options . db || options . database
406
407
options . port = parseInt ( options . port )
407
408
409
+ if ( 'application_name' in options . connection === false )
410
+ options . connection . application_name = 'postgres.js'
411
+
408
412
if ( ! options . path && options . host . indexOf ( '/' ) > - 1 )
409
413
options . path = options . host + '/.s.PGSQL.' + options . port
410
414
You can’t perform that action at this time.
0 commit comments