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

From Decibel!
Subject Re: psql \G command -- send query and output using extended format
Date
Msg-id CA780414-017B-4CDC-B458-1FF0035CCCEA@decibel.org
Whole thread Raw
In response to Re: psql \G command -- send query and output using extended format  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Apr 3, 2008, at 9:35 AM, Tom Lane wrote:
> "Dawid Kuroczko" <qnex42@gmail.com> writes:
>> The idea of \G command is to perform the query, but with printing
>> query results using extended table output format.
>
> Seems a bit useless --- if you prefer \x format, wouldn't you  
> prefer it
> all the time?  Or at least often enough that the toggling command is
> fine?  I'm dubious that this is worth eating up a command letter for.

I agree about not eating a letter, but...

I often find myself wanting to do stuff like tuple-only output for a  
single query in scripts. It would be nice if there was a command  
(\G ?) that would accept additional options for controlling output.  
It should be possible to map the options to existing psql output  
stuff, so that you could force any single command to output in any  
format that you wanted it to.
-- 
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: File system snapshots for multiple file systems
Next
From: Heikki Linnakangas
Date:
Subject: Re: File system snapshots for multiple file systems