Re: Avoid is possible a expensive function call (src/backend/utils/adt/varlena.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Avoid is possible a expensive function call (src/backend/utils/adt/varlena.c)
Дата
Msg-id CAEudQAqjM8nXC6ZAS5z3rfqsXNbdLCZQNc-P-U1TXAs0Qg3JpQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Avoid is possible a expensive function call (src/backend/utils/adt/varlena.c)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Em seg., 4 de mar. de 2024 às 20:28, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Mar 04, 2024 at 03:08:03PM -0300, Ranier Vilela wrote:
>> I can't see any user validation at the function pg_newlocale_from_collation.

> Matthias is right, look closer.  I can see more than one check,
> especially note the one related to the collation version mismatch that
> should not be silently ignored.

The fast path through that code doesn't include any checks, true,
but the point is that finding the entry proves that we made those
checks previously.  I can't agree with making those semantics
squishy in order to save a few cycles in the exact-equality case.
Robustness is a fair point.

best regards,
Ranier Vilela

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

Предыдущее
От: Richard Guo
Дата:
Сообщение: Get rid of the excess semicolon in planner.c
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: SQL Property Graph Queries (SQL/PGQ)