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 1hsyIe-0002Tf-6a for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Jul 2019 23:46:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hsyIc-0006Xa-Kn for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Jul 2019 23:46:26 +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 1hsyIb-0006Pw-H8 for pgsql-bugs@lists.postgresql.org; Wed, 31 Jul 2019 23:46:26 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hsyIY-0007Kn-L5 for pgsql-bugs@lists.postgresql.org; Wed, 31 Jul 2019 23:46:24 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 572E020814; Wed, 31 Jul 2019 19:46:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 31 Jul 2019 19:46:21 -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=LAc/9frtMHtoCswRgz843307os0 ojwTWofFbHlBBiv0=; b=PixM3Jm/p/G4Ack7KL4ZOheuq++ihUVhHUGcFd6z+y8 77clj1kgtzDS+01fVhWfPWLcFp5u39W47yS/eBSAekyIzJWHFsgYe1xukMQHh3xa sek2onC4fnlvhAsQfZ+kz91872FNYo84fT2ZnS/dySVhtiKq6tEiYI/KDGGWLPvH Y3LV/hSKT/ixNbRyAwGBVZpzntffYU3pDgHhncobzAJ6QJCy2JVmyfZEb6VyXyHp +c+MBr9Eldy+IJeA+wT5lb8mnXzcFa9HtUT3MOt6rDvB5aDc7RvjdPPj2i8KB48Z dNdGJT2zLRFb5aLIY6TlZbIrHwJm9nvxdo1VDsDIUcw== 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=LAc/9f rtMHtoCswRgz843307os0ojwTWofFbHlBBiv0=; b=ZWUzw3dxvrRKskXueP2Caj DBa7xxZ9KCyBfL2nxfX5Vcs7uAREMewCL+MAEcvLJ1hEloV46Ht70M8wwoh4T4ux eFE9NjfGQU6i9T+eE7kExCuaXdptfGm1z3KMhizob85X/8ScLlx9ucRDQnfSmp6Z XqSQo2Qb+IEgMgXR1PCZOjoIR/fSMB5dbr3RDNt8pf0GEun1kKgyrZAYjhAK4G+n hFiOrU5U5+Srt4D5SN+PXdDyVWMe+QM9u20Z2sxVVYTQUqNsbEARXIrHvH+j/kl+ Ih4oQLNMXMogBZhJGvE7kb6eaBPDEUruF7M7d3Ap5l+MppiT6Jnwb0+UC/CdPjag == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrleeigddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculddvfedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfk phepudduuddruddtvddrudektddrudekheenucfrrghrrghmpehmrghilhhfrhhomhepmh hitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 36C688005B; Wed, 31 Jul 2019 19:46:19 -0400 (EDT) Date: Thu, 1 Aug 2019 08:46:16 +0900 From: Michael Paquier To: Sergei Kornilov Cc: Marks Polakovs , pgsql-bugs Subject: Re: UPDATE with json_populate_recordset empty array crashes server Message-ID: <20190731234616.GC29334@paquier.xyz> References: <16c473d9703.bcae5a61323706.3752002245992279523@markspolakovs.me> <18620891564566850@iva3-67f911cb3a01.qloud-c.yandex.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4jXrM3lyYWu4nBt5" Content-Disposition: inline In-Reply-To: <18620891564566850@iva3-67f911cb3a01.qloud-c.yandex.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --4jXrM3lyYWu4nBt5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 31, 2019 at 12:54:10PM +0300, Sergei Kornilov wrote: > I think this was already fixed for a long time: > https://www.postgresql.org/docs/11/release-11-2.html > Fix crash when zero rows are fed to json[b]_populate_recordset() > or json[b]_to_recordset() (Tom Lane)=20 Yes, this has been fixed and it matches to this commit: commit: eba2ce17121f198316d050e71d8bd049a43783ba author: Tom Lane date: Thu, 22 Nov 2018 15:14:01 -0500 Fix another crash in json{b}_populate_recordset and json{b}_to_recordset. And here is the related thread: https://www.postgresql.org/message-id/15514-59d5b4c4065b178b@postgresql.org -- Michael --4jXrM3lyYWu4nBt5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl1CKEgACgkQnvQgOdby QH07nw//YB2DOlpjz9BEBt5w+wl+zfEEcb906dAKZ3eLk8ZKsZa6eSjyptU9FKZ2 2QeGgfr+B6+GTZR1TV1dOkMeo/wMEbPLw+BwBbKBEk/OgjLFbdu8egkW3KPUyOGf 0Gk3dgnbeZt2pJ9tzEpzy2jqwcecaytxwn/eOnPZlrlN7syydAo+4XepeamJXHQI rZ3qyZoLOZ78cnIlfBm3OaMevlFZypQzEHiORIyp4ok3qU7TmKJnYIXN3CVJlHuv VuCU3KTERppkt0mY6iK0JAjcBEl8bW3l6gx01/g6a6Udm6x0obIh11acQKlg1nmQ X99gL0EKQA2PNaph4z8P4+8mj6MfHc6vylIsOY7UVmfxjCR0ylSsM4jV39U1WqmZ uE6KYua89UqKtTI0For76TO4e2f0B7vEfYSVwE8wUeFqOYGq9TOWnDyZkPW1p92L WgEafcmGKOAGQEeRuUcvCtNJx+N5kpdScer0ywnC+gbjJShx1Hjbnr1yhvdWiB4L oTtyRyC7Z+ZsJ1l1c3K103ss/UrQt3iGakfXSfVY8FIjdnmxAOQHkss1Aw87dhs4 nFf8A5JU609tODNLaAJhhyhp6/xgBBYuWx6Xp9fLfotRZ59YqmR9xoJJpAVHb3dZ ZH07dzw+sMNH+2CFJBrUeKjfXSl74bLOqgOSV+GtAOLmFxqRdpY= =tqSq -----END PGP SIGNATURE----- --4jXrM3lyYWu4nBt5--