Re: BUG #16936: psql: \c service= not working - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16936: psql: \c service= not working
Date
Msg-id 809836.1616464184@sss.pgh.pa.us
Whole thread Raw
In response to BUG #16936: psql: \c service= not working  (PG Bug reporting form <noreply@postgresql.org>)
List 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



pgsql-bugs by date:

Previous
From: Scott
Date:
Subject: Multiple Values Inserts for Generated Columns Erroring Out
Next
From: PG Bug reporting form
Date:
Subject: BUG #16939: Plural interval for negative singular