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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
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 22:12:07
Message-ID: 27990.1358892727@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cédric Villemain 2013-01-22 22:47:25 Re: Request for vote to move forward with recovery.conf overhaul
Previous Message Dickson S. Guedes 2013-01-22 21:53:35 Re: psql: small patch to correct filename formatting error in '\s FILE' output