Re: psql: small patch to correct filename formatting error in '\s FILE' output

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql: small patch to correct filename formatting error in '\s FILE' output
Date: 2013-09-10 04:22:15
Message-ID: CAB8KJ=ix4Su-MD5GYfh_MC7yZXKN=dP-+dwLvPb+FXe5-TTcXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/9/10 Bruce Momjian <bruce(at)momjian(dot)us>:
> On Tue, Jan 22, 2013 at 07:30:59PM -0500, Tom Lane wrote:
>> Ian Lawrence Barwick <barwick(at)gmail(dot)com> writes:
>> > Related email from the archives on this subject:
>> > http://www.postgresql.org/message-id/37ed240d0611200645l5b70c8ddw5fb735e0d35a7b22@mail.gmail.com
>>
>> I agree with the opinion stated there that \cd with no argument really
>> ought to do what "cd" with no argument usually does on the platform.
>> So if we're going to fix \cd to print the resulting current directory,
>> wouldn't it work to just set "dir" to "." rather than "/" for Windows?
>>
>> > Does commit 0725065b just need to be reverted, or is an additional
>> > patch required to remove the prefixed working directory from \s output?
>>
>> Offhand it looked like reverting the commit would be enough, but I
>> didn't look hard to see if there had been any subsequent related
>> changes. [ pokes around... ] Well, at least there are still no other
>> uses of pset.dirname.
>
> I still see that weird behavior in git head:
>
> pgdevel=# \s history.txt
> Wrote history to file "./history.txt".
> pgdevel=# \s /tmp/history.txt
> Wrote history to file ".//tmp/history.txt".
> pgdevel=# \cd /tmp
> pgdevel=# \s /tmp/history.txt
> Wrote history to file "/tmp//tmp/history.txt".
>
> Should I revert the suggested patch?

IIRC the patch was never applied, the reversion candidate is the existing
commit 0725065b.

(Sorry for not following up earlier, this one dropped off my radar).

Regards

Ian Barwick

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2013-09-10 04:51:37 Re: ECPG FETCH readahead
Previous Message Tom Lane 2013-09-10 03:29:59 Re: Protocol forced to V2 in low-memory conditions?