Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cX8h5-0006NW-K5 for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2017 15:44:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cX8h5-0005zy-18 for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2017 15:44:07 +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 1cX8fe-0003bP-QW for pgsql-hackers@postgresql.org; Fri, 27 Jan 2017 15:42:38 +0000 Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cX8fb-0004uq-JX for pgsql-hackers@postgresql.org; Fri, 27 Jan 2017 15:42:37 +0000 Received: by mail-qt0-x229.google.com with SMTP id v23so139942217qtb.0 for ; Fri, 27 Jan 2017 07:42:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=jIn8nLGCPIPcCbee3TYSwaI+1oagCRroQVcjYY7xmrA=; b=MznMPNMQ1ZJzqVe/EEBEP0Qnh2b8FRg35dP9obMUpeeVXiIloOBv3rhd/iM0K0B9qg 9puSZLvRX64cTiPxD+B66DThvqzXz3emSi2pqN+besQzZv6WCJHE5MmvUzGwKblzJI9d lFJrui4wlDac08bpefIX7/TLygkQbHLf7snS3RymEOGTjstwAJp0lUbqJugq2FicLyWy XOfGpZh1PD6GEVId4xBkyMw57pEvDUre6CNQilY5YBAOKhbXx4dbQ6bcwLjPz9d532LP NLMBPhboIwt29YbEe70H0KlOY+pYZbo9E6WaxA0VQjkjLQ4iTC34f+p6Jj/3Ms3EQwpF SD5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=jIn8nLGCPIPcCbee3TYSwaI+1oagCRroQVcjYY7xmrA=; b=jcZ/RW6w3ADZD9GQyXDSf8ibUw+sGZUGFlabCvvo8Geyph4p49pGQqY7k7vUcwGd/d NMORyoRMg7uST2RJ7toGuec1W/N+PitsE/CdlcSpQj8HhrEIV4eSXaGUoJTXTLDtlSFH WDjcz+b11zPnXAXlyZwgq9xLf/8F6FlveMjm66EtGqiIvr9ISP36bC3y6+HwSFbXtg7C lN/Dhak/V47pEsR5B5xV4fVidbTwe+Q1a4pB6Tpa4qlbCodZPEXZjtNkWTwPb6NMH6mC XP5uFSj21GNj8NvlbiPpvd+umuk3t1PUNK3SLe8lOxckZE8+C1XgekT+z9qaHssqrxKV 93gA== X-Gm-Message-State: AIkVDXL08QXRMpTAb7ZTtOIiWEAtwHQuOeLYKCSJXJ4kiFTzr7E0q1FO9kQcrNlz1FKYFxs4 X-Received: by 10.200.49.167 with SMTP id h36mr8002251qte.11.1485531754094; Fri, 27 Jan 2017 07:42:34 -0800 (PST) Received: from alvin.alvh.no-ip.org ([179.57.112.237]) by smtp.gmail.com with ESMTPSA id t62sm4378287qkc.33.2017.01.27.07.42.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jan 2017 07:42:33 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id A206F1D74; Fri, 27 Jan 2017 12:42:31 -0300 (CLST) Date: Fri, 27 Jan 2017 12:42:31 -0300 From: Alvaro Herrera To: Stephen Frost Cc: D'Arcy Cain , pgsql-hackers@postgresql.org Subject: Re: One-shot expanded output in psql using \G Message-ID: <20170127154231.bdnejznebwcx2jkk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170127153116.GF9812@tamriel.snowman.net> User-Agent: NeoMutt/20170113 (1.7.2) X-Pg-Spam-Score: -2.6 (--) 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 wrote: > * Alvaro Herrera (alvherre@2ndquadrant.com) wrote: > > I think the suggestion is that \G replaces \g (which is the same thing > > as the semicolon). So you would do this: > > > > SELECT * FROM table WHERE table_status = 1; % get a short list; normal output > > SELECT * FROM table WHERE table_id = 123 \G % drill down to one ID > > 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). -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers