Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cX8Ps-0005b0-WB for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2017 15:26:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cX8Ps-0006kj-HQ for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2017 15:26:20 +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 1cX8Pq-0006jy-TL for pgsql-hackers@postgresql.org; Fri, 27 Jan 2017 15:26:19 +0000 Received: from mail-qt0-x231.google.com ([2607:f8b0:400d:c0d::231]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cX8Pn-0004dz-01 for pgsql-hackers@postgresql.org; Fri, 27 Jan 2017 15:26:17 +0000 Received: by mail-qt0-x231.google.com with SMTP id w20so73858680qtb.1 for ; Fri, 27 Jan 2017 07:26:14 -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=sJOWdMjaYY5YGiXE4EN9Zo5jkIGSlRirpiRtJcsgAeM=; b=n0/z+1jneqSA+Gy0SnASU0osbS+Lle09lqHPC+mk6hinG77W1hRW+eDYqRj5g9qVRZ 7UrqG64thpMYSC4u3tpkGLbhmX1+Uj94rNzw9WKxyXSHSojPrJLvO1uwC+Kpr9AyI+xd XSgdXSpr0oxshstYhDOG0L8VTMcGfdf0IueNzlI1ZhfTJK3YKqqNDlvYbwd0S02f3GzI +POu0gou0Va4YtUiEa7pT38r+UDIxsUi/xSrJNEHHmgYyzj5mcYqxHXGp6befAx5kU6Z RhIy9QLVM8TyahW4w0S+N/yuZG2nnOyHGTrgvX+P0mz4NgUG6NcqnnU5EEBpCBQxGjT9 PDZQ== 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=sJOWdMjaYY5YGiXE4EN9Zo5jkIGSlRirpiRtJcsgAeM=; b=J7UWQFea2p7FfLnSJZHyH75R+PQvjv2bLP0//dfMks254j7wacfoEpLeZ7KOlZK/PJ jCP9bRHt9QRrAgqY6kHDuz1R78DE7kKQ/lSrHPBQ+HJeaU8ledCaMMQt/Veq6pAGwVEf XhmqE13JnUOoDSGVeUN0Ka3CvGrRNR0YmS8mA94+ysSQKFBNHqfLTPXnvIfed7Uq4I+a Kzl0AtWqid1lKuE8kg+mhSmbJGv5+1dPDGdHN6xMizQZfYQsOCbdtzMaDUHgBMKSyUlT 4Vf7aHwc8ROykTAuH2lWVQHJrtPH+npugMHURmpHfun/f9knb0z9c+JxeaCellGCYbE2 nuhQ== X-Gm-Message-State: AIkVDXK1Kec7l+CJdYybQDWHMME7ybuKpvMhVrcjnVac1pc3qtGHm4EhfvBdb/uLkYc5PZ5x X-Received: by 10.55.204.13 with SMTP id r13mr8493147qki.260.1485530771309; Fri, 27 Jan 2017 07:26:11 -0800 (PST) Received: from alvin.alvh.no-ip.org ([179.57.112.237]) by smtp.gmail.com with ESMTPSA id s2sm4378963qts.25.2017.01.27.07.26.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jan 2017 07:26:10 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 0CCC01D74; Fri, 27 Jan 2017 12:26:09 -0300 (CLST) Date: Fri, 27 Jan 2017 12:26:09 -0300 From: Alvaro Herrera To: D'Arcy Cain Cc: pgsql-hackers@postgresql.org Subject: Re: One-shot expanded output in psql using \G Message-ID: <20170127152609.hsjdr5cetlxm47ke@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8b8068d9-b218-06c6-6b98-8d7f1a365449@druid.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 D'Arcy Cain wrote: > I am a pretty heavy user of psql but I don't think that that would be so > helpful. I assume you mean a new option, let's call it "\X" the causes the > next query to be expanded. I type "\X" then a query. I realize that I made > a mistake and have to redo the query so I have to type "\X" again. If I > forget then I have to run the query yet again. 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 -- Á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