Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxJpS-0001Fi-Ec for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Jun 2021 01:43:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lxJpR-0001gd-3y for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Jun 2021 01:43:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxJpQ-0001gV-SY for pgsql-hackers@lists.postgresql.org; Sun, 27 Jun 2021 01:43:20 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxJpJ-0004iE-Ms for pgsql-hackers@postgresql.org; Sun, 27 Jun 2021 01:43:20 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5C4515C0139; Sat, 26 Jun 2021 21:43:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 26 Jun 2021 21:43:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=wOe1KEKGPvIHsMujIgkJZC7aJsY YZgv0I1TNfQI6qIU=; b=N/QVn5FfSGES9rG8pID/mOwpVxlW6XXJ0VOXDQAHVyj AKE7v4fEsxbL3eXm4Qb6q+YGUNp0pGKcfVgLrQmZLaRpqvCEXDqYDL2la7w0Mv5R gSCULFpGK0bUCCTHauzwFni4bsOhRIxqSIY/d1yHJuxrenl7vJfblLnyqkRMu0mM D47EFVedqIBTN40eicexl/O5BnvzGgSsDY+Ai0/muYtYDQjcpe4aaqEErkflQaPj ejKg1GMShJUz1tpx1mioC2DeRL8bXl62biuIR+de61DVq2CGFihumkF9GmnkVOdK fNdAtu0QkTyRCqhGwDzmiJBe/WIaqiSs8hQlCh/Vkyg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=wOe1KE KGPvIHsMujIgkJZC7aJsYYZgv0I1TNfQI6qIU=; b=Cu7M3CmWTmYsUaBiacEihZ A87nEt0rmVm6rNQoBZ+K11Ywu2Vs13Sm46Uv3jVqyxRj43OKKM9ZxJIdujGeLjL7 +9FuCh69ucrGNpwQLByrp3IHkWEF+S4brAlgLXpOyO6AG3JZ1ocSJMwcLMyuV8P4 CbTeCPvyrL5DWF9VvU0FDkHPEu2SQtFJaVnHmyi0oSFAte8zHs8pDk7/JIW2bHLJ jM56FEOZQ6WOL6ZAtLHZr6ZBRTXghqHaUQhJq+bxAlluJ2dMwUUAammdybWOf5eu J6E1Z4gbNi7fbQsBPoHA7I5jgHS7zsuRU+rN4ud0HN90JPeXCNPHw7O/XlKYJKDw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeehuddggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeehjefgleefhfevtdeufffggedu gfegteefjeehtefhffejgeegfeethfefheehieenucffohhmrghinhepihgvthhfrdhorh hgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhi tghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 26 Jun 2021 21:43:08 -0400 (EDT) Date: Sun, 27 Jun 2021 10:43:00 +0900 From: Michael Paquier To: Tom Lane Cc: Jacob Champion , "pgsql-hackers@postgresql.org" , Daniel Gustafsson Subject: Re: [PATCH] Make jsonapi usable from libpq Message-ID: References: <3045186.1624729430@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xSm3zVqUcAuPBwyZ" Content-Disposition: inline In-Reply-To: <3045186.1624729430@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --xSm3zVqUcAuPBwyZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jun 26, 2021 at 01:43:50PM -0400, Tom Lane wrote: > BTW, so far as the original topic of this thread is concerned, > it sounds like Jacob's ultimate goal is to put some functionality > into libpq that requires JSON parsing. I'm going to say up front > that that sounds like a terrible idea. As we've just seen, libpq > operates under very tight constraints, not all of which are > mechanically enforced. I am really doubtful that anything that > would require a JSON parser has any business being in libpq. > Unless you can sell us on that point, I do not think it's worth > complicating the src/common JSON code to the point where it can > work under libpq's constraints. AFAIK, the SASL mechanism OAUTHBEARER described in RFC 7628 would require such facilities as failures are reported in this format: https://datatracker.ietf.org/doc/html/rfc7628 Perhaps you are right and we have no need to do any json parsing in libpq as long as we pass down the JSON blob, but I am not completely sure if we can avoid that either. Separate topic: I find disturbing the dependency of jsonapi.c to the logging parts just to cope with dummy error values that are originally part of JsonParseErrorType. -- Michael --xSm3zVqUcAuPBwyZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmDX16QACgkQnvQgOdby QH1Www//T25RZ6Ns6CbWCXzLGrrqRoDhejoY5GD1bNjHJv6SMdS8z47W3YwEXUjB lCqpDEBBocq8oQsWIleEWErgDFxeH/vLvvvcd32CDhB2CytoVnbU2jSO1PuBrvE8 Hk5doT8cQN8YEwrpApfXWWYwQe3/7vFArVc52ydl1iZoY0WW6DODFJCqtBsc0pNa Bhi3xOrgBe7O41NNiMhMBWsq+G+jXXkZs1ocpOSabGeP7VVbgTZfuO0+kKJsStxA K8ccB/xQmf1urBKtFEtbt8S3opa7opDa/6IQpdSeEtYup810kRtW4Q+gFSKprQzz /WDYNH/6lHVNE2P/qlwM16G3y9DYe77nOSoCk18CDaY5CM0EuKZCgtSFyfGwigR1 DwfS38qquqxy6P/nmlmwhy4fsCH4fqq7CHdPmldUf9YyCv5oJE9lXk7ftI1UK4CF X44Dj0MY+sGfbyF2to33fBpLKaJEJ/Suj2t5MhDOI3d3JMXj8NQw/k/X1EZm7N4E qdjkYarvFWAPb2cnUfinQzGKsVXz6prqVZFXC1EYGIygUViwNffgaLC1cYQvgQW5 5Ah7Nu3GQR3MLNGZv1RTzG6uIWs16mPEkT3FWnKx9bTGcqkGEkqdRWcs+380yyu2 p3FwIU2n9dT1jGZUzQY4KUkNKfh6+tnjrRDeETwoQv/uljdfddI= =q5BK -----END PGP SIGNATURE----- --xSm3zVqUcAuPBwyZ--