1
0
mirror of https://github.com/postgres/postgres.git synced 2026-01-26 09:41:40 +03:00

Improve portability of test with oid8 comparison function

Oversight in b139bd3b6e, per reports from buildfarm members longfin
and prion, that use -DSTRESS_SORT_INT_MIN.  Thanks to Tom Lane for the
poke.

Discussion: https://postgr.es/m/1656709.1767754981@sss.pgh.pa.us
This commit is contained in:
Michael Paquier
2026-01-07 12:55:16 +09:00
parent b139bd3b6e
commit a2e632ece1
2 changed files with 13 additions and 13 deletions

View File

@@ -344,22 +344,22 @@ SELECT DISTINCT (i || '000000000000' || j)::oid8 f
(100 rows)
-- 3-way compare for btrees
SELECT btoid8cmp(1::oid8, 2::oid8);
btoid8cmp
SELECT btoid8cmp(1::oid8, 2::oid8) < 0 AS val_lower;
val_lower
-----------
-1
t
(1 row)
SELECT btoid8cmp(2::oid8, 2::oid8);
btoid8cmp
SELECT btoid8cmp(2::oid8, 2::oid8) = 0 AS val_equal;
val_equal
-----------
0
t
(1 row)
SELECT btoid8cmp(2::oid8, 1::oid8);
btoid8cmp
-----------
1
SELECT btoid8cmp(2::oid8, 1::oid8) > 0 AS val_higher;
val_higher
------------
t
(1 row)
-- oid8 has btree and hash opclasses

View File

@@ -76,9 +76,9 @@ SELECT DISTINCT (i || '000000000000' || j)::oid8 f
ORDER BY f;
-- 3-way compare for btrees
SELECT btoid8cmp(1::oid8, 2::oid8);
SELECT btoid8cmp(2::oid8, 2::oid8);
SELECT btoid8cmp(2::oid8, 1::oid8);
SELECT btoid8cmp(1::oid8, 2::oid8) < 0 AS val_lower;
SELECT btoid8cmp(2::oid8, 2::oid8) = 0 AS val_equal;
SELECT btoid8cmp(2::oid8, 1::oid8) > 0 AS val_higher;
-- oid8 has btree and hash opclasses
CREATE INDEX on OID8_TBL USING btree(f1);