4 CREATE TABLE PG_LSN_TBL (f1 pg_lsn);
5 -- Largest and smallest input
6 INSERT INTO PG_LSN_TBL VALUES ('0/0');
7 INSERT INTO PG_LSN_TBL VALUES ('FFFFFFFF/FFFFFFFF');
9 INSERT INTO PG_LSN_TBL VALUES ('G/0');
10 ERROR: invalid input syntax for type pg_lsn: "G/0"
11 LINE 1: INSERT INTO PG_LSN_TBL VALUES ('G/0');
13 INSERT INTO PG_LSN_TBL VALUES ('-1/0');
14 ERROR: invalid input syntax for type pg_lsn: "-1/0"
15 LINE 1: INSERT INTO PG_LSN_TBL VALUES ('-1/0');
17 INSERT INTO PG_LSN_TBL VALUES (' 0/12345678');
18 ERROR: invalid input syntax for type pg_lsn: " 0/12345678"
19 LINE 1: INSERT INTO PG_LSN_TBL VALUES (' 0/12345678');
21 INSERT INTO PG_LSN_TBL VALUES ('ABCD/');
22 ERROR: invalid input syntax for type pg_lsn: "ABCD/"
23 LINE 1: INSERT INTO PG_LSN_TBL VALUES ('ABCD/');
25 INSERT INTO PG_LSN_TBL VALUES ('/ABCD');
26 ERROR: invalid input syntax for type pg_lsn: "/ABCD"
27 LINE 1: INSERT INTO PG_LSN_TBL VALUES ('/ABCD');
29 DROP TABLE PG_LSN_TBL;
31 SELECT '0/16AE7F8' = '0/16AE7F8'::pg_lsn;
37 SELECT '0/16AE7F8'::pg_lsn != '0/16AE7F7';
43 SELECT '0/16AE7F7' < '0/16AE7F8'::pg_lsn;
49 SELECT '0/16AE7F8' > pg_lsn '0/16AE7F7';
55 SELECT '0/16AE7F7'::pg_lsn - '0/16AE7F8'::pg_lsn;
61 SELECT '0/16AE7F8'::pg_lsn - '0/16AE7F7'::pg_lsn;
67 -- Check btree and hash opclasses
69 SELECT DISTINCT (i || '/' || j)::pg_lsn f
70 FROM generate_series(1, 10) i,
71 generate_series(1, 10) j,
72 generate_series(1, 5) k
73 WHERE i <= 10 AND j > 0 AND j <= 10
76 --------------------------------------------------------------------------
78 Sort Key: (((((i.i)::text || '/'::text) || (j.j)::text))::pg_lsn)
80 Group Key: ((((i.i)::text || '/'::text) || (j.j)::text))::pg_lsn
82 -> Function Scan on generate_series k
85 -> Function Scan on generate_series j
86 Filter: ((j > 0) AND (j <= 10))
87 -> Function Scan on generate_series i
91 SELECT DISTINCT (i || '/' || j)::pg_lsn f
92 FROM generate_series(1, 10) i,
93 generate_series(1, 10) j,
94 generate_series(1, 5) k
95 WHERE i <= 10 AND j > 0 AND j <= 10