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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pgsql: move hex_decode() to /common so it can be called from frontend
Дата
Msg-id 20201225014733.GC21105@momjian.us
обсуждение исходный текст
Ответ на Re: pgsql: move hex_decode() to /common so it can be called from frontend  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pgsql: move hex_decode() to /common so it can be called from frontend  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Fri, Dec 25, 2020 at 09:04:41AM +0900, Michael Paquier wrote:
> Looks like the defense put in place by 6b1c5ca has allowed to catch up
> a bug here.  When base64 has been copied from encode.c to src/common/
> for SCRAM (newlines should not be handled by SCRAM, hence the copy),
> we have done the same.  The copied code just returns -1 for error
> paths.  For this case, I think that you should also prefix those
> functions with "pg_", and also include the encode part for
> completeness.

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.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

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


Вложения

В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: move hex_decode() to /common so it can be called from frontend
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: move hex_decode() to /common so it can be called from frontend