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
{{ message }}
Repository navigation
PGPREPARE=false, PGFETCH_TYPES=false and PGDEBUG=false turn those options on #49
Options fall back to PG<OPTION> environment variables (src/index.js, around line 692: env['PG' + k.toUpperCase()] || d). URL values go through a check that turns 'false' and 'disable' into false; environment values don't. So any non-empty value enables the option, including 'false':
PGPREPARE=false: prepared statements on (q.prepare = options.prepare && … only tests truthiness). Behind PgBouncer or Supavisor in transaction mode this produces prepared-statement errors.
PGFETCH_TYPES=false: type fetching on.
PGDEBUG=false: debug on, so query parameters are added to error objects.
Inherited from upstream. The README says only that options "fall back to the same environment variables as psql" and doesn't document these PG<OPTION> variables, so few setups rely on them.
Fix: apply the same 'false'/'disable' mapping to environment values as to URL values. This changes behaviour only for setups that set one of these to false and currently get the opposite.
Same problem for SSL: PGSSL=disable or PGSSL=false turns SSL on, because the string is truthy. PGSSLMODE is never read, only PGSSL, so the README claim that options fall back to the same environment variables as psql is not quite true. Related: an explicit password: '' falls back to PGPASSWORD.
Fixed on main in 93ef818: PG environment values now map false and disable to off, like URL values. The remaining parts are tracked separately: PGSSLMODE in #125, the password '' fallback in #126.
Activity
okomarov commentedon Oct 17, 2026
Fixed on main in 93ef818: PG environment values now map false and disable to off, like URL values. The remaining parts are tracked separately: PGSSLMODE in #125, the password '' fallback in #126.
chore: release 4.5.0
okomarov commentedon Oct 17, 2026
Shipped in 4.5.0.