From: | Christoph Berg <christoph(dot)berg(at)credativ(dot)de> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, D'Arcy Cain <darcy(at)druid(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: One-shot expanded output in psql using \G |
Date: | 2017-01-27 18:05:51 |
Message-ID: | 20170127180551.xdgtf6dmhqa66xxw@msg.df7cb.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Re: Stephen Frost 2017-01-27 <20170127160544(dot)GI9812(at)tamriel(dot)snowman(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2017-01-27 18:06:18 | Re: pg_ls_dir & friends still have a hard-coded superuser check |
Previous Message | Peter Eisentraut | 2017-01-27 17:49:18 | Re: sequence data type |