From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: authentication/t/001_password.pl trashes ~/.psql_history |
Date: | 2023-12-23 17:31:16 |
Message-ID: | BA962FCF-C091-485E-AF84-9A7B8033B977@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 23 Dec 2023, at 17:52, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Andrew Dunstan <andrew(at)dunslane(dot)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.
Sorry for jumping in late, only saw this now (ETOOMUCHCHRISTMASPREP) but the
committed patch looks good to me too. Thanks!
--
Daniel Gustafsson
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-12-23 18:18:05 | Improving information_schema._pg_expandarray() |
Previous Message | Andrey M. Borodin | 2023-12-23 17:14:35 | Re: Transaction timeout |