pgsql: Update leakproofness markings on some btree comparisonfunctions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Update leakproofness markings on some btree comparisonfunctions
Дата
Msg-id E1ge5GM-0008P3-4W@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Update leakproofness markings on some btree comparison functions.

Mark pg_lsn and oidvector comparison functions as leakproof.  Per
discussion, these clearly are leakproof so we might as well mark them so.

On the other hand, remove leakproof markings from name comparison
functions other than equal/not-equal.  Now that these depend on
varstr_cmp, they can't be considered leakproof if text comparison isn't.
(This was my error in commit 586b98fdf.)

While at it, add some opr_sanity queries to catch cases where related
functions do not have the same volatility and leakproof markings.
This would clearly be bogus for commutator or negator pairs.  In the
domain of btree comparison functions, we do have some exceptions,
because text equality is leakproof but inequality comparisons are not.
That's odd on first glance but is reasonable (for now anyway) given
the much greater complexity of the inequality code paths.

Discussion: https://postgr.es/m/20181231172551.GA206480@gust.leadboat.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d01e75d68eb2a478c57af92cc38f23f3ce5e1e0f

Modified Files
--------------
src/include/catalog/catversion.h         |   2 +-
src/include/catalog/pg_proc.dat          | 102 +++++++++++++++----------------
src/test/regress/expected/opr_sanity.out |  77 ++++++++++++++++++-----
src/test/regress/sql/opr_sanity.sql      |  32 ++++++++++
4 files changed, 146 insertions(+), 67 deletions(-)


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Remove some useless code
Следующее
От: Noah Misch
Дата:
Сообщение: pgsql: pg_regress: Promptly detect failed postmaster startup.