From: Christoph Berg <christoph.berg@credativ.de>
To: Stephen Frost <sfrost@snowman.net>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: 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 19:05:51 +0100
Message-ID: <20170127180551.xdgtf6dmhqa66xxw@msg.df7cb.de> (raw)
In-Reply-To: <20170127160544.GI9812@tamriel.snowman.net>
References: <20170127153116.GF9812@tamriel.snowman.net>
<20170127154231.bdnejznebwcx2jkk@alvherre.pgsql>
<20170127160544.GI9812@tamriel.snowman.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Re: Stephen Frost 2017-01-27 <20170127160544.GI9812@tamriel.snowman.net>
> > > 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
> >
> > Sure, that's exactly the same thing. (You can omit the query in either
> > case which causes the previous query to be re-ran. \crosstabview,
> > \gexec etc also work like that).
>
> Right, I agree it's the same thing, but (clearly), not everyone
> discussing this realized that and, well, the \G-by-itself is a lot
> easier for me, at least. I have a really hard time not ending things
> with a semi-colon. ;)
Heh, tbh even I as the patch other didn't realize that \G-by-itself
just works, my intention was that it replaces the semicolon. :)
So, to clarify, both ways work:
select * from pg_class where relname = 'pg_class';
-- dang, much too wide, press <arrow-up>
select * from pg_class where relname = 'pg_class' \G
-- ah nice!
select * from pg_class where relname = 'pg_class';
-- dang, much too wide
\G
-- ah nice!
Christoph
--
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: christoph.berg@credativ.de, sfrost@snowman.net, alvherre@2ndquadrant.com, darcy@druid.net
Subject: Re: One-shot expanded output in psql using \G
In-Reply-To: <20170127180551.xdgtf6dmhqa66xxw@msg.df7cb.de>
* 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