From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | D'Arcy Cain <darcy(at)druid(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: One-shot expanded output in psql using \G |
Date: | 2017-01-27 15:26:09 |
Message-ID: | 20170127152609.hsjdr5cetlxm47ke@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2017-01-27 15:31:16 | Re: One-shot expanded output in psql using \G |
Previous Message | D'Arcy Cain | 2017-01-27 15:16:31 | Re: One-shot expanded output in psql using \G |