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 1iccxW-00010W-Mu for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Dec 2019 22:17:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iccxU-0003Vn-6z for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Dec 2019 22:17:20 +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 1iccxT-0003P4-OR for pgsql-hackers@lists.postgresql.org; Wed, 04 Dec 2019 22:17:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iccxQ-0004tt-On for pgsql-hackers@lists.postgresql.org; Wed, 04 Dec 2019 22:17:17 +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 xB4MHAFR003876; Wed, 4 Dec 2019 17:17:10 -0500 From: Tom Lane To: Alvaro Herrera cc: Andres Freund , Pg Hackers Subject: Re: adding strndup In-reply-to: <20191204220146.GA28850@alvherre.pgsql> References: <20191204220146.GA28850@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 04 Dec 2019 19:01:46 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3874.1575497830.1@sss.pgh.pa.us> Date: Wed, 04 Dec 2019 17:17:10 -0500 Message-ID: <3875.1575497830@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: >> I can get behind that ... it makes the patch a lot smaller. > Here it is. LGTM. > I noticed that ECPG's copy was setting errno. I had forgot to do that > in my previous patch, but on second look, malloc failure already sets > it, so doing it again is pointless. Right. regards, tom lane