pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Christoph Berg <christoph.berg@credativ.de>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: One-shot expanded output in psql using \G
Date: Mon, 30 Jan 2017 10:04:59 -0500
Message-ID: <20170130150458.GC9812@tamriel.snowman.net> (raw)
In-Reply-To: <CAFj8pRDLr=exBc4QZg7POLZcGHNi539ibhVqmGzWctyPo0TZ7A@mail.gmail.com>
References: <20170127132737.6skslelaf4txs6iw@msg.credativ.de>
	<74e7fd23-f5a9-488d-a8c4-1e0da674b27c@manitou-mail.org>
	<20170130101424.fo4knpn4blaohazk@msg.df7cb.de>
	<20170130134608.GA9812@tamriel.snowman.net>
	<CAFj8pRDLr=exBc4QZg7POLZcGHNi539ibhVqmGzWctyPo0TZ7A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

* Pavel Stehule (pavel.stehule@gmail.com) wrote:
> 2017-01-30 14:46 GMT+01:00 Stephen Frost <sfrost@snowman.net>:
> 
> > * Christoph Berg (christoph.berg@credativ.de) wrote:
> > > Re: Daniel Verite 2017-01-28 <74e7fd23-f5a9-488d-a8c4-
> > 1e0da674b27c@manitou-mail.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.

This particular bike-shedding really doesn't seem to be terribly useful
or sensible, to me.  \gx isn't "consistent" or "descriptive", frankly.

If anything, 'x' as the second character, today, implies "extension" as
it's used that way by \dx.

Let's go with \G and be done with it.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (45+ messages)  latest in thread

Message-ID: <20170130150458.GC9812@tamriel.snowman.net>
Permalink:  ../20170130150458.GC9812@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20170130150458.GC9812@tamriel.snowman.net

 · 

reply

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: sfrost@snowman.net, pavel.stehule@gmail.com, christoph.berg@credativ.de, daniel@manitou-mail.org
  Subject: Re: One-shot expanded output in psql using \G
  In-Reply-To: <20170130150458.GC9812@tamriel.snowman.net>

* 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