Re: Display output file name in psql prompt?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex <ash(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Display output file name in psql prompt?
Date: 2013-03-12 21:41:59
Message-ID: 3898.1363124519@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alex <ash(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-03-12 21:45:40 Re: Display output file name in psql prompt?
Previous Message Alex 2013-03-12 20:05:10 Display output file name in psql prompt?