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 1iya61-0006sk-UU for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Feb 2020 11:40:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iya5z-0008UK-8B for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Feb 2020 11:40:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iya5y-0008TW-Rq for pgsql-hackers@lists.postgresql.org; Mon, 03 Feb 2020 11:40:51 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iya5w-0006f1-MX for pgsql-hackers@lists.postgresql.org; Mon, 03 Feb 2020 11:40:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=itZ4PUlLs+zmqRCNd5VGvHG9dq3ob+Yo1i9o0iTYyas=; b=ZhbfSp1WMp/SUeg415oW5G/JUd dQbAGKVUSpB53FiL4iDrqMO0Zi7WjtSIXW9nYOQZrSELi+icphwC3u9FaieYfCE+c5xaqQyBIapBy EZljFq0fDFGnLqbj/PVgjkmnNJ6BlhIiq/UrOdoy4iKqqy04QRYmVcmgRFNt8igk1Iv0=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1iya5W-00059b-N2; Mon, 03 Feb 2020 12:40:22 +0100 Date: Mon, 3 Feb 2020 12:40:22 +0100 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Tom Lane Cc: Daniel Gustafsson , Hamid Akhtar , pgsql-hackers@lists.postgresql.org Subject: Re: BUG #16171: Potential malformed JSON in explain output Message-ID: <20200203114022.GA29777@depesz.com> Reply-To: depesz@depesz.com References: <16171-b72259ab75505fa2@postgresql.org> <495433FC-A268-4956-9B61-5FB135EE5B73@yesql.se> <157985813081.742.12901374861257824963.pgcf@coridan.postgresql.org> <9342.1580585875@sss.pgh.pa.us> <5217695A-8776-4F59-823A-B391DCA1F601@yesql.se> <1763.1580662112@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1763.1580662112@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Feb 02, 2020 at 11:48:32AM -0500, Tom Lane wrote: > > Does that prevent backpatching this, or are we Ok with EXPLAIN text output not > > being stable across minors? AFAICT Pg::Explain still works fine with this > > change, but mileage may vary for other parsers. > I'm not sure about that either. It should be a clear win for parsers > of the non-text formats, because now we're generating valid > JSON-or-whatever where we were not before. But it's not too hard to > imagine that someone's ad-hoc parser of text output would break, > depending on how much it relies on field order rather than indentation > to make sense of things. Change looks reasonable to me. Interestingly Pg::Explain doesn't handle either current JSON output in this case (as it's not a valid JSON), nor the new one - but this can be fixed easily. Best regards, depesz