Re: psql \G command -- send query and output using extended format
От | Dawid Kuroczko |
---|---|
Тема | Re: psql \G command -- send query and output using extended format |
Дата | |
Msg-id | 758d5e7f0804030749j152ab2aer5616f107d528157e@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: psql \G command -- send query and output using extended format (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: psql \G command -- send query and output using
extended format
|
Список | pgsql-hackers |
On Thu, Apr 3, 2008 at 4:35 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > "Dawid Kuroczko" <qnex42@gmail.com> writes: > > The idea of \G command is to perform the query, but with printing > > query results using extended table output format. > > Seems a bit useless --- if you prefer \x format, wouldn't you prefer it > all the time? Or at least often enough that the toggling command is > fine? I'm dubious that this is worth eating up a command letter for. No, the point is that I usually have mixed queries -- ones which are most comfortably viewed in normal format (many not-so-long rows), and ones which are best viewed expanded (little rows, many columns). Alternating between formats using "\x" is, at least for me, a bit cumbersome: usually _after_ I wrote a query I realize "it would look more readable in expanded format", which is a bit too late. So I run the query, ctrl+c, \x, rerun the query... and forget to turn expanded mode off afterwards. I think that ability to decide about the format after the query, not before, can be quite useful especially when writing ad-hoc queries. Incidentally "\g" and "\G" is also used more or less similarily by our dolphin-loving friends -- which doesn't help using "\G" for other things. Regards, Dawid
В списке pgsql-hackers по дате отправления: