Re: [HACKERS] One-shot expanded output in psql using \G - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [HACKERS] One-shot expanded output in psql using \G
Date
Msg-id 20170127153116.GF9812@tamriel.snowman.net
Whole thread Raw
In response to Re: [HACKERS] One-shot expanded output in psql using \G  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [HACKERS] One-shot expanded output in psql using \G  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: [HACKERS] One-shot expanded output in psql using \G  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
* Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> D'Arcy Cain wrote:
>
> > I am a pretty heavy user of psql but I don't think that that would be so
> > helpful.  I assume you mean a new option, let's call it "\X" the causes the
> > next query to be expanded.  I type "\X" then a query.  I realize that I made
> > a mistake and have to redo the query so I have to type "\X" again.  If I
> > forget then I have to run the query yet again.
>
> I think the suggestion is that \G replaces \g (which is the same thing
> as the semicolon).  So you would do this:
>
> SELECT * FROM table WHERE table_status = 1; % get a short list; normal output
> SELECT * FROM table WHERE table_id = 123 \G % drill down to one ID

Uh, I figured it was more like \g, which just re-runs the last query..
As in, you'd do:

table pg_proc; % blargh, I can't read it like this
\G % ahh, much nicer

Thanks!

Stephen

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] One-shot expanded output in psql using \G
Next
From: Haribabu Kommi
Date:
Subject: Re: [HACKERS] pg_hba_file_settings view patch