Re: psql \G command -- send query and output using extended format - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: psql \G command -- send query and output using extended format
Date
Msg-id 20080403164927.GB22851@svana.org
Whole thread Raw
In response to Re: psql \G command -- send query and output using extended format  (Bruce Momjian <bruce@momjian.us>)
Responses Re: psql \G command -- send query and output using extended format  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Thu, Apr 03, 2008 at 12:07:54PM -0400, Bruce Momjian wrote:
> > Alternating between formats using "\x" is, at least for me, a bit
> > cumbersome: usually _after_ I wrote a query I realize "it would
> > look more readable in expanded format", which is a bit too late.
> > So I run the query, ctrl+c, \x, rerun the query... and forget to
> > turn expanded mode off afterwards.
>
> It seems more helpful if there were \x option to use extended format
> only when the output is too wide.  TODO already has:

I was thinking that maybe \x should have a one-shot mode, i.e.

\x <query>

does it only for this one statement. It would solve the OPs problem.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: modules
Next
From: Steve Atkins
Date:
Subject: Re: modules