Re: pgsql: move hex_decode() to /common so it can be called from frontend

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: move hex_decode() to /common so it can be called from frontend
Date: 2020-12-25 02:22:32
Message-ID: 20201225022232.GA19054@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Dec 24, 2020 at 09:20:27PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> 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 <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-12-25 02:38:13 pgsql: Avoid time-of-day-dependent failure in log rotation test.
Previous Message Tom Lane 2020-12-25 02:20:27 Re: pgsql: move hex_decode() to /common so it can be called from frontend