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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Christoph Berg <christoph(dot)berg(at)credativ(dot)de>, Daniel Verite <daniel(at)manitou-mail(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: One-shot expanded output in psql using \G
Date: 2017-01-30 14:40:39
Message-ID: CAFj8pRDLr=exBc4QZg7POLZcGHNi539ibhVqmGzWctyPo0TZ7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2017-01-30 14:46 GMT+01:00 Stephen Frost <sfrost(at)snowman(dot)net>:

> * Christoph Berg (christoph(dot)berg(at)credativ(dot)de) wrote:
> > Re: Daniel Verite 2017-01-28 <74e7fd23-f5a9-488d-a8c4-
> 1e0da674b27c(at)manitou-mail(dot)org>
> > > > Mysql's CLI client is using \G for this purpose, and adding the very
> > > > same functionality to psql fits nicely into the set of existing
> > > > backslash commands: \g sends the query buffer, \G will do exactly the
> > > > same as \g (including parameters), but forces expanded output just
> for
> > > > this query.
> > >
> > > +1 for the functionality but should we choose to ignore the comparison
> > > to mysql, I'd suggest \gx for the name.
> >
> > IMHO \G is a tad easier to type than \gx, though the difference isn't
> > huge, so I would be fine with either. But do we really want to choose
> > something different just because MySQL is using it? \G will be much
> > easier to explain to existing users (both people coming from MySQL to
> > PostgreSQL, and PostgreSQL users doing a detour into foreign
> > territory), and it would be one difference less to have to care about
> > when typing on the CLIs.
> >
> > +1 on \G.
>
> Agreed, +1 on \G and with the above argument- why in the world would we
> want to avoid using \G just because MySQL uses it?
>

The argument so MySQL uses it is not good. But \gx respect convention and
it is little bit more descriptive.

The difference is minor - I prefer \gx due consistency with Postgres. I
don't know much MySQL people who use a terminal.

Regards

Pavel

>
> Thanks!
>
> Stephen
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2017-01-30 14:42:47 Re: Superowners
Previous Message Bernd Helmle 2017-01-30 14:26:20 Re: Deadlock in XLogInsert at AIX