Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYEEH-0007uz-Ob for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jan 2017 15:50:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cYEEG-0007Rs-VM for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jan 2017 15:50:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cYECq-0005gx-Rf for pgsql-hackers@postgresql.org; Mon, 30 Jan 2017 15:49:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cYECo-0003w7-66 for pgsql-hackers@postgresql.org; Mon, 30 Jan 2017 15:49:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v0UFnH0b004588; Mon, 30 Jan 2017 10:49:17 -0500 From: Tom Lane To: Stephen Frost cc: Pavel Stehule , Christoph Berg , Daniel Verite , PostgreSQL Hackers Subject: Re: One-shot expanded output in psql using \G In-reply-to: <20170130153532.GE9812@tamriel.snowman.net> References: <20170127132737.6skslelaf4txs6iw@msg.credativ.de> <74e7fd23-f5a9-488d-a8c4-1e0da674b27c@manitou-mail.org> <20170130101424.fo4knpn4blaohazk@msg.df7cb.de> <20170130134608.GA9812@tamriel.snowman.net> <20170130150458.GC9812@tamriel.snowman.net> <24326.1485789276@sss.pgh.pa.us> <20170130153532.GE9812@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Mon, 30 Jan 2017 10:35:33 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4586.1485791357.1@sss.pgh.pa.us> Date: Mon, 30 Jan 2017 10:49:17 -0500 Message-ID: <4587.1485791357@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Stephen Frost writes: > * Tom Lane (tgl@sss.pgh.pa.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers