Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXAuR-0004O9-KA for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2017 18:06:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cXAuQ-0007bw-UB for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2017 18:06:02 +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 1cXAuP-0007b7-Aw for pgsql-hackers@postgresql.org; Fri, 27 Jan 2017 18:06:01 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cXAuI-0007cS-RN for pgsql-hackers@postgresql.org; Fri, 27 Jan 2017 18:05:59 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1470:60c0:76e5:bff:fef3:7e00]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 3v96Cg6KBjz3Dyx; Fri, 27 Jan 2017 19:05:51 +0100 (CET) Date: Fri, 27 Jan 2017 19:05:51 +0100 From: Christoph Berg To: Stephen Frost Cc: Alvaro Herrera , D'Arcy Cain , pgsql-hackers@postgresql.org Subject: Re: One-shot expanded output in psql using \G Message-ID: <20170127180551.xdgtf6dmhqa66xxw@msg.df7cb.de> Mail-Followup-To: Christoph Berg , Stephen Frost , Alvaro Herrera , D'Arcy Cain , pgsql-hackers@postgresql.org References: <20170127153116.GF9812@tamriel.snowman.net> <20170127154231.bdnejznebwcx2jkk@alvherre.pgsql> <20170127160544.GI9812@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170127160544.GI9812@tamriel.snowman.net> User-Agent: NeoMutt/20161126 (1.7.1) 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 Re: Stephen Frost 2017-01-27 <20170127160544.GI9812@tamriel.snowman.net> > > > Uh, I figured it was more like \g, which just re-runs the last query.. > > > As in, you'd do: > > > > > > table pg_proc; % blargh, I can't read it like this > > > \G % ahh, much nicer > > > > Sure, that's exactly the same thing. (You can omit the query in either > > case which causes the previous query to be re-ran. \crosstabview, > > \gexec etc also work like that). > > Right, I agree it's the same thing, but (clearly), not everyone > discussing this realized that and, well, the \G-by-itself is a lot > easier for me, at least. I have a really hard time not ending things > with a semi-colon. ;) Heh, tbh even I as the patch other didn't realize that \G-by-itself just works, my intention was that it replaces the semicolon. :) So, to clarify, both ways work: select * from pg_class where relname = 'pg_class'; -- dang, much too wide, press select * from pg_class where relname = 'pg_class' \G -- ah nice! select * from pg_class where relname = 'pg_class'; -- dang, much too wide \G -- ah nice! Christoph -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers