From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Update leakproofness markings on some btree comparison functions
Date: Mon, 31 Dec 2018 21:38:18 +0000
Message-ID: <E1ge5GM-0008P3-4W@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Update leakproofness markings on some btree comparison functions
In-Reply-To: <E1ge5GM-0008P3-4W@gemulon.postgresql.org>
References: <E1ge5GM-0008P3-4W@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox