From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: D'Arcy Cain <darcy@druid.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: One-shot expanded output in psql using \G
Date: Fri, 27 Jan 2017 12:26:09 -0300
Message-ID: <20170127152609.hsjdr5cetlxm47ke@alvherre.pgsql> (raw)
In-Reply-To: <8b8068d9-b218-06c6-6b98-8d7f1a365449@druid.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, darcy@druid.net
Subject: Re: One-shot expanded output in psql using \G
In-Reply-To: <20170127152609.hsjdr5cetlxm47ke@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox