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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, 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 15:49:17
Message-ID: 4587.1485791357@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
>> Why not? To me it reads as "\g with an x option". The "x" refers to
>> the implied "\x", so it's not an arbitrary choice at all.

> That's not how '\dx' works, as I pointed out, so I don't see having the
> second character being 'x' to imply "\x mode" makes sense.

It is how \d[tisv] works, or the S or + modifiers to \d. If you don't
like the "x" in particular, feel free to propose a different letter that
makes more sense to you --- but I'm pretty convinced that this ought to
be seen as \g-plus-a-modifier.

>> The main problem I see with \G is that it's a dead end. If somebody
>> comes along next year and says "I'd like a variant of \g with some other
>> frammish", what will we do? There are no more case variants to use.

> I don't believe there's any reason to think someone else couldn't come
> along later and add \gq for whatever they want. Simply because we use
> \G for something doesn't mean \g can't ever be further extended.

So at some point we'd be documenting \G as a legacy mysql-compatible
spelling of \gx, because it would become blindingly obvious that it was
a non-orthogonal wart. Let's just skip that phase and get to the
extensible syntax.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2017-01-30 15:52:36 Re: One-shot expanded output in psql using \G
Previous Message Tom Lane 2017-01-30 15:43:29 Re: Superowners