Re: Patch: Code comments: why some text-handling functions are leakproof

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Patch: Code comments: why some text-handling functions are leakproof
Дата
Msg-id CA+TgmoZbR9jLXE7PjNn4vD+efkJnwzgQx6GuT1RHBpTw1GF4pw@mail.gmail.com
обсуждение исходный текст
Ответ на Patch: Code comments: why some text-handling functions are leakproof  (Gurjeet Singh <gurjeet@singh.im>)
Ответы Re: Patch: Code comments: why some text-handling functions are leakproof  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Jan 11, 2022 at 2:07 AM Gurjeet Singh <gurjeet@singh.im> wrote:
> Please see attached a small patch to document why some text-processing functions are marked as leakproof, while some
othersare not. 
>
> This is more or less a verbatim copy of Tom's comment in email thread at [1].
>
> I could not find an appropriate spot to place these comments, so I placed them on bttextcmp() function, The only
otherplace that I could see we can place these comments is in the file src/backend/optimizer/README, because there is
someconsideration given to leakproof functions in optimizer docs. But these comments seem quite out of place in
optimizerdocs. 

It doesn't seem particularly likely that someone who is thinking about
changing this in the future would notice the comment in the place
where you propose to put it, nor that they would read the optimizer
README.

Furthermore, I don't know that everyone agrees with Tom about this. I
do agree that it's more important to mark relational operators
leakproof than other things, and I also agree that conservatism is
warranted. But that does not mean that someone could not make a
compelling argument for marking other functions leakproof.

I think we will be better off leaving this alone.

--
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Adding CI to our tree