From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@lists.postgresql.org, Daniel Gustafsson <daniel@yesql.se>
Subject: Re: authentication/t/001_password.pl trashes ~/.psql_history
Date: Sat, 23 Dec 2023 11:52:56 -0500
Message-ID: <1306174.1703350376@sss.pgh.pa.us> (raw)
In-Reply-To: <c4be4dad-7345-3452-3368-a8689927065d@dunslane.net>
References: <794610.1703182896@sss.pgh.pa.us>
<1136842.1703283096@sss.pgh.pa.us>
<c4be4dad-7345-3452-3368-a8689927065d@dunslane.net>
Andrew Dunstan <andrew@dunslane.net> writes:
> On 2023-12-22 Fr 17:11, Tom Lane wrote:
>> After studying this some more, my conclusion is that BackgroundPsql.pm
>> failed to borrow as much as it should have from 010_tab_completion.pl.
>> Specifically, we want all the environment-variable changes that that
>> script performed to be applied in any test using an interactive psql.
>> Maybe ~/.inputrc and so forth would never affect any other test scripts,
>> but that doesn't seem like a great bet.
> Looks fine, after reading your original post I was thinking along the
> same lines.
Thanks for reviewing.
> You could shorten this
> + my $history_file = $params{history_file};
> + $history_file ||= '/dev/null';
> + $ENV{PSQL_HISTORY} = $history_file;
> to just
> $ENV{PSQL_HISTORY} = $params{history_file} || '/dev/null';
OK. I was unsure which way would be considered more readable,
but based on your advice I shortened it.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net, daniel@yesql.se
Subject: Re: authentication/t/001_password.pl trashes ~/.psql_history
In-Reply-To: <1306174.1703350376@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox