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 1kscie-0006Yn-VC for pgsql-committers@arkaria.postgresql.org; Fri, 25 Dec 2020 02:20:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kscib-0001Yz-Rw for pgsql-committers@arkaria.postgresql.org; Fri, 25 Dec 2020 02:20:37 +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 1kscib-0001Ys-N0 for pgsql-committers@lists.postgresql.org; Fri, 25 Dec 2020 02:20:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ksciU-00050R-IH for pgsql-committers@lists.postgresql.org; Fri, 25 Dec 2020 02:20:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0BP2KRcB1124720; Thu, 24 Dec 2020 21:20:28 -0500 From: Tom Lane To: Bruce Momjian cc: Michael Paquier , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: move hex_decode() to /common so it can be called from frontend In-reply-to: <20201225014733.GC21105@momjian.us> References: <1080268.1608851689@sss.pgh.pa.us> <20201224231620.GA21105@momjian.us> <20201225014733.GC21105@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Thu, 24 Dec 2020 20:47:33 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1124718.1608862827.1@sss.pgh.pa.us> Date: Thu, 24 Dec 2020 21:20:27 -0500 Message-ID: <1124719.1608862827@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bruce Momjian writes: > I now understand the wisdom of your suggestion. Attached is a patch > that removes hex_decode from ecpg properly, and returns -1 from the > /common version. I'm fairly unimpressed with this. I don't like having fundamentally different (and 100% undocumented) behaviors between the frontend and backend versions of the "same" function. I think you should leave ecpglib alone. Unifying that little bit of code isn't worth having to contort the API of the common version. regards, tom lane