Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrnbC-0007Pm-4x for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Oct 2015 13:50:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZrnbB-0006Nr-O3 for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Oct 2015 13:50:37 +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) (envelope-from ) id 1Zrnb9-0006M3-LA for pgsql-hackers@postgresql.org; Thu, 29 Oct 2015 13:50:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zrnb6-00054Y-VO for pgsql-hackers@postgresql.org; Thu, 29 Oct 2015 13:50:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t9TDoRSs027337; Thu, 29 Oct 2015 09:50:27 -0400 From: Tom Lane To: Marko Tiikkaja cc: Daniel Verite , PostgreSQL hackers Subject: Re: psql: add \pset true/false In-reply-to: <5631FCAF.9060204@joh.to> References: <0949c317-3ec4-4516-a3aa-33a6cfbf5267@mm> <5631FCAF.9060204@joh.to> Comments: In-reply-to Marko Tiikkaja message dated "Thu, 29 Oct 2015 12:02:07 +0100" Date: Thu, 29 Oct 2015 09:50:27 -0400 Message-ID: <27336.1446126627@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Marko Tiikkaja writes: > On 10/29/15 11:51 AM, Daniel Verite wrote: >> Personally I think it would be worth having, but how about >> booleans inside ROW() or composite types ? > There's not enough information sent over to do that in the client. > Note that this works the same way as \pset null with SELECT > ROW(NULL), so I don't consider it a show stopper for the patch. The problem with that argument is that \pset null is already a kluge (but at least a datatype-independent one). Now you've added a datatype specific kluge of the same ilk. It might be useful, it might be short, but that doesn't make it not a kluge. The really key argument that hasn't been addressed here is why does such a behavior belong in psql, rather than elsewhere? Surely legibility problems aren't unique to psql users. Moreover, there are exactly parallel facilities for other datatypes on the server side: think DateStyle or bytea_output. So if you were trying to follow precedent rather than invent a kluge, you'd have submitted a patch to create a GUC that changes the output of boolout(). Now, that would create a debate about backwards compatibility and whether making bool output more readable was worth possibly breaking some applications, but I do not think this patch should escape scrutiny for the same issue. There are plenty of people with shell scripts that look at psql output, which might get broken by careless use of this \pset. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers