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 1ksckZ-0006dm-0u for pgsql-committers@arkaria.postgresql.org; Fri, 25 Dec 2020 02:22:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ksckX-0001xa-W1 for pgsql-committers@arkaria.postgresql.org; Fri, 25 Dec 2020 02:22: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 1ksckX-0001xT-R2 for pgsql-committers@lists.postgresql.org; Fri, 25 Dec 2020 02:22:37 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ksckV-00050w-CT for pgsql-committers@lists.postgresql.org; Fri, 25 Dec 2020 02:22:37 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1ksckS-0007vv-Sr; Thu, 24 Dec 2020 21:22:32 -0500 Date: Thu, 24 Dec 2020 21:22:32 -0500 From: Bruce Momjian To: Tom Lane Cc: Michael Paquier , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: move hex_decode() to /common so it can be called from frontend Message-ID: <20201225022232.GA19054@momjian.us> References: <1080268.1608851689@sss.pgh.pa.us> <20201224231620.GA21105@momjian.us> <20201225014733.GC21105@momjian.us> <1124719.1608862827@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1124719.1608862827@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Dec 24, 2020 at 09:20:27PM -0500, Tom Lane wrote: > 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. OK, sure, I can see that point too. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee