Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iyn4F-0001n5-0v for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Feb 2020 01:31:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iyn4D-0008Ur-Oc for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Feb 2020 01:31:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iyn4D-0008RY-8M for pgsql-hackers@lists.postgresql.org; Tue, 04 Feb 2020 01:31:53 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iyn4A-0005ij-Lk for pgsql-hackers@postgresql.org; Tue, 04 Feb 2020 01:31:52 +0000 Received: by mail-pj1-x102b.google.com with SMTP id d5so594600pjz.5 for ; Mon, 03 Feb 2020 17:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XUh7S7m9t0fjPkx0lWd3iwv4Vbu7wv7VlO5PJBjJ9xw=; b=QiRNAKFGntJuS0ipJulkzddztKVXl23d07jAQdNrey5luzBQ2DtIT7+KSRpopc1n+J 79iwzsBelttvBIbLWHx8TpBuaehD4jMsD4FtVu56YylvlQeqUcnBO/rby0YiGF3TB6PA zT4A6FtDf3wpoV51c1wPdwMsNh6F2ExINSbWP0SN0KJUf77+NNmulnbiHxoEpT86PbvJ 7qmhk7Bqy7kIq5B+R7k5ryKW5f7TG+z63VbayLY1RKeTRTT7C+LZdalGJTtJSdvjU+HP B2YwW50f7R7Ampkdh5p72zhu2ZfWBjysxydeucIbe7aad2pRQ18xQhdBlRhWbne6mOru OCOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XUh7S7m9t0fjPkx0lWd3iwv4Vbu7wv7VlO5PJBjJ9xw=; b=m0nbfTrkR8zXJidi2JBrL0ScYCGNz4Jc6OjQGK2J8jP5OuP5ofleM2iehLcZqVhz+z tQSkEKwe0NplMYrHMI5wWgf51rFcJJnFyK7OdbazYc+NStGXdT3xRAt9ZGH2Mmq8DJNX 1lhgUUpcMUvMeykk0Fg2G5aBf9JsXqvdcNMvvdVbnJ7DVyYEnarvzxwBoo489dIYFuWU 3NblOO9gfTWpk1NSzoNB8/tdMeG1D3aXMS1eZoy56SArzkeMo9J/S0ABAnupbYykHNxp 63g0s0zwjpP9k4Z1cxYQGvvEIK3Y25cwb/TuivY9LTJHdD+5hW/8U1w3QSO/wf1WS85u m20g== X-Gm-Message-State: APjAAAWCm3JzTj3NFLzCNhSV1tow2KZrxNTck79jnAyMtpcwNYDn+OzP wJB5kJeT7L2vxk6RXqWupqISJLliblxdByb4mcKjs7d58qpoyjovd4AAKISBDRgmUWEi8aVO3Yw Aln81kHIjrlsdpw3+jjVqNroVD5Zj2ydUA95rQsJQ/fQE3IWSRUfIDWggZfn4/1w0s/+jrVuPGh FLdB91IpPtZfdu X-Google-Smtp-Source: APXvYqxsstzl24jTb+9FJotTiK8gfVEKq8jTiL7IPTEvu7/gj+mGy+5o9qVQRCkaSKrFghSXGvcOpA== X-Received: by 2002:a17:90b:3109:: with SMTP id gc9mr2652935pjb.30.1580779908237; Mon, 03 Feb 2020 17:31:48 -0800 (PST) Received: from osaka.octopusnet (p14214-ipngn10501marunouchi.tokyo.ocn.ne.jp. [118.1.101.214]) by smtp.gmail.com with ESMTPSA id gx18sm736607pjb.8.2020.02.03.17.31.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Feb 2020 17:31:47 -0800 (PST) Subject: Re: Add %x to PROMPT1 and PROMPT2 To: Tom Lane , Daniel Gustafsson Cc: Michael Paquier , Vik Fearing , Fabien COELHO , PostgreSQL-development References: <09502c40-cfe1-bb29-10f9-4b3fa7b2bbb2@2ndquadrant.com> <13bc9081-2cf8-bf99-bedb-ce70c82bebc8@2ndquadrant.com> <20200203070807.GD2180@paquier.xyz> <5E008326-2335-4FB2-8513-D9018EC94F02@yesql.se> <6749.1580740801@sss.pgh.pa.us> From: Ian Barwick Message-ID: <79ac1ca0-2bab-bbe4-126a-01966f812075@2ndquadrant.com> Date: Tue, 4 Feb 2020 10:31:43 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <6749.1580740801@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020/02/03 23:40, Tom Lane wrote: > Daniel Gustafsson writes: >> On 3 Feb 2020, at 08:08, Michael Paquier wrote: >>> FWIW, I am not really in favor of changing a default old enough that >>> it could vote (a45195a). > >> That by itself doesn't seem a good reason to not change things. > >> My concern would be that users who have never ever considered that the prompt >> can be changed, all of sudden wonder why the prompt is showing characters it >> normally isn't, thus causing confusion. That being said, I agree that this is >> a better default long-term. > > I've got the same misgivings as Michael. In a green field this'd likely > be a good idea, but after so many years I'm afraid it will make fewer > people happy than unhappy. > > Now on the other hand, we did change the server's default log_line_prefix > not so long ago (7d323to se5ba4), and the feared storm of complaints was pretty > much undetectable. So maybe this'd go down the same way. Worth noting > also is that this shouldn't be able to break any applications, since the > prompt is an interactive-only behavior. The last change I recall affecting default psql behaviour was the addition of COMP_KEYWORD_CASE in 9.2 (db84ba65), which personally I (and no doubt others) found annoying, but the world still turns. +1 one for this change, it's something I also add to every .psqlrc I setup. Moreover, some of my work involves logging in at short notice to other people's systems where I don't have control over the .psqlrc setup - while I can of course set the prompt manually it's an extra step, and it would be really nice to see the transaction status by default when working on critical systems in a time-critical situation. (Obviously it'll take a few years for this change to filter into production...). Regards Ian Barwick -- Ian Barwick https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services