Re: [HACKERS] One-shot expanded output in psql using \G

Поиск
Список
Период
Сортировка
От Christoph Berg
Тема Re: [HACKERS] One-shot expanded output in psql using \G
Дата
Msg-id 20170127180551.xdgtf6dmhqa66xxw@msg.df7cb.de
обсуждение исходный текст
Ответ на Re: [HACKERS] One-shot expanded output in psql using \G  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] sequence data type
Следующее
От: Dave Page
Дата:
Сообщение: Re: [HACKERS] pg_ls_dir & friends still have a hard-coded superuser check