From: | Ian Lawrence Barwick <barwick(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql: small patch to correct filename formatting error in '\s FILE' output |
Date: | 2013-01-22 23:05:03 |
Message-ID: | CAB8KJ=h++SM6hPXE8AXwDpCxWTAhFUtHeTK9cFg-AUGA21hehQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2013/1/23 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> I wrote:
>> If we did think that this specific backslash command needed to be able
>> to print something other than the filename as-entered, I'd be inclined
>> to just apply make_absolute_path() to the name, instead of relying on
>> inadequate dead-reckoning. However, that would require making
>> make_absolute_path available in src/port/ or someplace, which seems
>> a bit more than this "feature" is worth. Why should \s, and \s alone,
>> need to remind you where you're cd'd to?
>
> It strikes me that a more useful "reminder" feature could be implemented
> by having \cd itself print the new current directory, which it could do
> with a simple call to getcwd(), thus not requiring refactoring of
> make_absolute_path. Then for instance if you'd forgotten where you
> were, "\cd ." would tell you.
\! pwd does the trick as well.
However personally I prefer to get some kind of feedback from an
action, so having
\cd confirm the directory would be nice. I'll submit a patch.
Related email from the archives on this subject:
http://www.postgresql.org/message-id/37ed240d0611200645l5b70c8ddw5fb735e0d35a7b22@mail.gmail.com
Does commit 0725065b just need to be reverted, or is an additional
patch required to remove the prefixed working directory from \s output?
Ian Barwick
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-01-22 23:32:43 | Re: BUG #7814: Rotation of the log is not carried out. |
Previous Message | Jeff Janes | 2013-01-22 22:59:18 | Re: BUG #7814: Rotation of the log is not carried out. |