diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/xid.out | 10 | ||||
-rw-r--r-- | src/test/regress/sql/xid.sql | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/test/regress/expected/xid.out b/src/test/regress/expected/xid.out index b7a1ed0f9ee..d8e76f3321f 100644 --- a/src/test/regress/expected/xid.out +++ b/src/test/regress/expected/xid.out @@ -129,8 +129,16 @@ select xid8cmp('1', '2'), xid8cmp('2', '2'), xid8cmp('2', '1'); -1 | 0 | 1 (1 row) --- xid8 has btree and hash opclasses +-- min() and max() for xid8 create table xid8_t1 (x xid8); +insert into xid8_t1 values ('0'), ('010'), ('42'), ('0xffffffffffffffff'), ('-1'); +select min(x), max(x) from xid8_t1; + min | max +-----+---------------------- + 0 | 18446744073709551615 +(1 row) + +-- xid8 has btree and hash opclasses create index on xid8_t1 using btree(x); create index on xid8_t1 using hash(x); drop table xid8_t1; diff --git a/src/test/regress/sql/xid.sql b/src/test/regress/sql/xid.sql index 565714d4620..bee17e63643 100644 --- a/src/test/regress/sql/xid.sql +++ b/src/test/regress/sql/xid.sql @@ -41,8 +41,12 @@ select '1'::xid8 >= '2'::xid8, '2'::xid8 >= '2'::xid8, '2'::xid8 >= '1'::xid8; -- we also have a 3way compare for btrees select xid8cmp('1', '2'), xid8cmp('2', '2'), xid8cmp('2', '1'); --- xid8 has btree and hash opclasses +-- min() and max() for xid8 create table xid8_t1 (x xid8); +insert into xid8_t1 values ('0'), ('010'), ('42'), ('0xffffffffffffffff'), ('-1'); +select min(x), max(x) from xid8_t1; + +-- xid8 has btree and hash opclasses create index on xid8_t1 using btree(x); create index on xid8_t1 using hash(x); drop table xid8_t1; |