Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UStt2-00055f-FT for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Apr 2013 18:48:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UStt1-0002Up-OU for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Apr 2013 18:48:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UStt1-0002Uk-7y for pgsql-bugs@postgresql.org; Thu, 18 Apr 2013 18:48:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UStsy-0007XK-9Y for pgsql-bugs@postgresql.org; Thu, 18 Apr 2013 18:48:46 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r3IImgdP008165; Thu, 18 Apr 2013 14:48:42 -0400 (EDT) From: Tom Lane To: nyetter@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8094: psql prompt variable and command substitution broken In-reply-to: References: Comments: In-reply-to nyetter@gmail.com message dated "Thu, 18 Apr 2013 17:43:33 -0000" Date: Thu, 18 Apr 2013 14:48:41 -0400 Message-ID: <8164.1366310921@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org nyetter@gmail.com writes: > My psql PROMPT1, set through /etc/sysconfig/pgsql/psqlrc, is the following: > h:%M%040d:%/%040U:%n%040AC:%:AUTOCOMMIT:%040TX:%x%012%R%#%040 You did not show us exactly how you set that, but I speculate that you weren't bothering to quote it. 9.2 is more consistent than prior versions were about expanding :variable references in backslash commands, which means that you'd better quote the reference to :AUTOCOMMIT if you don't want it expanded on-the-spot before it goes into the prompt string. I'd suggest putting single quotes around the argument of \set PROMPT1, viz \set PROMPT1 'h:%M%040d:%/%040U:%n%040AC:%:AUTOCOMMIT:%040TX:%x%012%R%#%040' regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs