Re: Moving other hex functions to /common

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Moving other hex functions to /common
Date: 2021-01-06 13:58:23
Message-ID: 20210106135823.GD32172@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 6, 2021 at 01:10:28PM +0900, Michael Paquier wrote:
> > It was very confusing, and this attached patch fixes all of that. I
> > also added the pg_ prefix you suggrested. If we want to add dstlen to
> > all the functions, we have to do it for all types --- not sure it is
> > worth it, now that things are much clearer.
>
> Overflow protection is very important in my opinion here once we
> expose more those functions. Not touching ECPG at all and not making
> this refactoring pluggable into shared libs is fine by me at the end
> because we don't have a case for libpq yet, but I object to the lack
> of protection against overflows.

Fine. Do you want to add the overflow to the patch I posted, for all
encoding types?

--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tang, Haiying 2021-01-06 15:03:35 RE: [Patch] Optimize dropping of relation buffers using dlist
Previous Message Heikki Linnakangas 2021-01-06 13:58:22 Re: Incorrect allocation handling for cryptohash functions with OpenSSL