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 1hvukO-0000Bi-K2 for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Aug 2019 02:35:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hvukN-0001RV-FA for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Aug 2019 02:35:15 +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 1hvukN-0001MQ-5y for pgsql-bugs@lists.postgresql.org; Fri, 09 Aug 2019 02:35:15 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hvukK-0008LJ-NV for pgsql-bugs@lists.postgresql.org; Fri, 09 Aug 2019 02:35:14 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4574F21B84; Thu, 8 Aug 2019 22:35:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 08 Aug 2019 22:35:11 -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=SBxO2frhA2hL6n65TBtdrUODQBG NqdM1MChiOtLK1yY=; b=owPA+JQGGUuC0IOcOFOpU59Qqe/ReOlrA1f83ZkueVZ ovn9m3iGR5+S2zSnNck2KY5TURyOo6XV59eGIoKgNdMwumrBYlKb6Q6qTh5MnZGO 5EZlTVfvay7a3Nb1vVcxVTwCi4TRG2KAOh3kL2PfvkHqC0IXSLO1HVYuQxHb7ul3 otYC0CLfBRLtHw/x4ph2Thim775ScYuz1jw9GQdwixPZmrX+rb0vNtfR2NIUYZeb BM7uXtCKKT04Y7d3LmYkrLuIESgq1cvIRwYhvIYWh96Loxt6amBFlznrQ0O/1gBo J5HWsjousekIUPA5D5YB2JXZTaz8300DOSuZDZ8yHag== 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=SBxO2f rhA2hL6n65TBtdrUODQBGNqdM1MChiOtLK1yY=; b=fxAQMcxDE2X7ZQ7Lgdi6R6 VmvIRKs8KV19vEOME/zguQMjCu2hDwoWEJtMmvfVR1ydIE1eUXalvIpodsXRViPM apzThEAwu1qRRNJyiTNs1+MR98NF7KMCOs9UcdXQbeHYNhi8xiIMsEU+iQ+/92NH MtbB68dQmGCY8Stc4WXLYlCFosCZXavhFH1clnXRqyT2JC7gYcfJVIyEVtN7VhmW 5GABZDnIeOi8usgfsRw7udmXhAFtp9XOYL3FhSoSUvIYD8GypyOCfX2TJtIrkEgh DGbhEeZq3pozSQRqOIAOkdk3wBinmP0RFFuR8uq+kum5QihWKQ+rvi6AechQBLSw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudduiedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepuddukedrvdeguddrvdegkedrudegheenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (mp76f1f891.ap.nuro.jp [118.241.248.145]) by mail.messagingengine.com (Postfix) with ESMTPA id BC388380075; Thu, 8 Aug 2019 22:35:08 -0400 (EDT) Date: Fri, 9 Aug 2019 11:35:05 +0900 From: Michael Paquier To: Merlin Moncure Cc: Tom Lane , Dmitry Dolgov <9erthalion6@gmail.com>, yarexeray@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15940: json_populate_recordset fails with ERROR: record type has not been registered Message-ID: <20190809023505.GE3194@paquier.xyz> References: <15940-2ab76dc58ffb85b6@postgresql.org> <20190806073209.GI32256@paquier.xyz> <5154.1565120306@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5oH/S/bF6lOfqCQb" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --5oH/S/bF6lOfqCQb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 06, 2019 at 02:53:45PM -0500, Merlin Moncure wrote: > For posterity I agree that OP was essentially exploiting undefined, or > at least poorly defined, behavior. For my money, I'd advise using > this function for cases where you don't want to use an in place type, > just a column list: If I were to change something here, that would be this error string exposed to the user. With the current error, there is no real way that the user knows what is wrong and why he/she should not do that. Could it be possible to add some recommendation for example on top of an error "cannot do that because blah"? -- Michael --5oH/S/bF6lOfqCQb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl1M29kACgkQnvQgOdby QH3Bnw/+OcQKjgwurwA9JWkmwfAzI1ELWwZ3CEtvueAesx6ceR1n/Oh9axpfOEHd CHt+8vVx9ycKozZ9c6gfa/GdC1Fn8DZ91SF2IAjKGeCWKAUHVWLuiWs8BIgp7TFY xt74AY91yk99LaCFZN1Dr/mLdeoq6jpZWXhW4+Wz7J8akDDeTOPxwMjVfEbYJ0rC j7ClEH+UUKnELDPN7Px8gKk/wwUgWbPQAe9j5vFuk0P+CSDjI5WRIGnwRER0UpSA WTzW5W+BybVav0kCqv5V1Kok9DxW1VBMeX9vCyX7Dcbsssu0xmbd+QpZSb8j95IU jOG+pfy8g4ZSZiVnrIraxbDVmKjFNdf95mqBAG7CNVpiAfg6xon1e/KsZjEUmU1t tCi/7l95yPuXJX4oxKRJz7TYRWGFHFNQyMoh9vwxzpLiSxri6Nt8OGNMLPmwDy0W Q45uK+/+0g3RvSWUj1zdkhI23RPCbmALX4sPOL0cmxy945nRcZddQt1IPNCiGp7Z 3m7kDjySBaF3tHrncBzbKJrM+01z4p8B6qkpm4yX8fZ5xsIV3e8nCJXUhwiey9dV ZgC95cUtm+dbS6U3MI/fLO9+X84pLKPyxyeU8OkGhQarQQr9Dl8bn4rtfoyNirwx uh+gRRgKCkKjfE0dmnZqjNb4O8+APbB6bA0hhlAw8e3ipMC7Xrw= =iuYx -----END PGP SIGNATURE----- --5oH/S/bF6lOfqCQb--