Re: Display output file name in psql prompt? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Display output file name in psql prompt?
Date
Msg-id 3898.1363124519@sss.pgh.pa.us
Whole thread Raw
In response to Display output file name in psql prompt?  (Alex <ash@commandprompt.com>)
Responses Re: Display output file name in psql prompt?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Alex <ash@commandprompt.com> writes:
> Today when I get back home and connected to my psql prompt I've left
> running under $terminal_multiplexor I've run some SQL, but no output did
> appear on my screen.  I have immediately realized that it must be
> sending it to a file instead of STDOUT as I have instructed it earlier
> today using \o command, but have totally forgot about the fact.

> So I wonder if there's a way to make psql display the current output
> file/command in the prompt?  After reading the current docs, I don't see
> any option.  Would a patch be accepted for submission (make it into
> default prompt, unless stdout?)

If you're proposing changing the contents of the default prompt, I think
that has very little chance of passing.  A new option for something to
add into a custom prompt might get accepted.  I'm not sure that that
approach would do much for the scenario you describe, since it's
unlikely that anyone would add it to their prompt (at least not before
they'd gotten burnt...).  However, I don't recall hearing of anyone
getting confused like this before, and you say you figured it out pretty
quickly, so it doesn't seem like a big problem.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alex
Date:
Subject: Display output file name in psql prompt?
Next
From: Josh Berkus
Date:
Subject: Re: Display output file name in psql prompt?