Re: BUG #16936: psql: \c service= not working
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pg_bugs@revmaps.no-ip.org
Cc: pgsql-bugs@lists.postgresql.org
Date: 2021-03-23T01:49:44Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes: > The \c metacommand in psql does not anymore use the full information from > pg_service.conf > It's reading the pg_service.conf file but seems to ignore everything but the > dbname=part part of the entry. this bug seems to be new, but is possibly not > in the psql binary itself, as the bug seems to have at-least partially > migrated to older versions of psql too. Hmm, I suppose this has something to do with the fixes for bug #16604 [1]. Those were not supposed to affect the behavior for -reuse-previous=off cases, which yours should be since there's an "=" in the \c argument. However, after poking at it for a bit, I have a theory: are the service-file entries that aren't being honored overridden by variables from your environment (PGPORT etc)? I think that patch may have unintentionally changed the relative priority of service file entries versus other sources of default values. regards, tom lane [1] https://www.postgresql.org/message-id/flat/16604-933f4b8791227b15%40postgresql.org
Commits
-
Fix psql's \connect command some more.
- ea8013854504 14.0 landed
- d75edab42c66 11.12 landed
- d5a905ed5e7b 10.17 landed
- c6eac71a8844 13.3 landed
- beac4bd65dcf 12.7 landed
- 4f670c64efd9 9.6.22 landed