Re: BUG #16936: psql: \c service= not working

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pg_bugs(at)revmaps(dot)no-ip(dot)org
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16936: psql: \c service= not working
Date: 2021-03-23 01:49:44
Message-ID: 809836.1616464184@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-03-23 05:21:30 BUG #16939: Plural interval for negative singular
Previous Message Scott 2021-03-22 23:59:48 Multiple Values Inserts for Generated Columns Erroring Out