Skip to content

Commit 958a7a5

Browse files
Merge pull request #161 from postgrespro/PGPRO-14880
[PGPRO-14880] Fix tests for PostgreSQL 18
2 parents a1e6023 + bf9edef commit 958a7a5

24 files changed

+170
-175
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ RELATIVE_INCLUDES = $(addprefix src/, $(INCLUDES))
2121

2222
LDFLAGS_SL += $(filter -lm, $(LIBS))
2323

24-
REGRESS = rum rum_validate rum_hash ruminv timestamp \
25-
orderby orderby_hash limits \
26-
int2 int4 float4 float8 money oid \
24+
REGRESS = security rum rum_validate rum_hash ruminv timestamp \
25+
orderby orderby_hash altorder altorder_hash limits \
26+
int2 int4 int8 float4 float8 money oid \
2727
time timetz date interval \
28-
macaddr inet cidr varchar char bytea bit varbit \
29-
numeric rum_weight expr
28+
macaddr inet cidr text varchar char bytea bit varbit \
29+
numeric rum_weight expr array
3030

3131
TAP_TESTS = 1
3232

expected/altorder.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* altorder.out - test output for 64-bit systems
77
* altorder_1.out - test output for 32-bit systems
88
*
9-
* Since c01743aa486 (>=18) EXPLAIN output was changed,
10-
* now it includes the number of disabled nodes
9+
* Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed,
10+
* now it shows whether nodes are disabled.
1111
*
1212
* altorder_2.out - test output for 32-bit systems (>=18)
1313
*

expected/altorder_1.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* altorder.out - test output for 64-bit systems
77
* altorder_1.out - test output for 32-bit systems
88
*
9-
* Since c01743aa486 (>=18) EXPLAIN output was changed,
10-
* now it includes the number of disabled nodes
9+
* Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed,
10+
* now it shows whether nodes are disabled.
1111
*
1212
* altorder_2.out - test output for 32-bit systems (>=18)
1313
*

expected/altorder_2.out

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* altorder.out - test output for 64-bit systems
77
* altorder_1.out - test output for 32-bit systems
88
*
9-
* Since c01743aa486 (>=18) EXPLAIN output was changed,
10-
* now it includes the number of disabled nodes
9+
* Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed,
10+
* now it shows whether nodes are disabled.
1111
*
1212
* altorder_2.out - test output for 32-bit systems (>=18)
1313
*
@@ -190,11 +190,10 @@ SELECT count(*) FROM atsts WHERE t @@ 'wr|qh';
190190
QUERY PLAN
191191
---------------------------------------------------
192192
Aggregate
193-
Disabled Nodes: 1
194193
-> Seq Scan on atsts
195-
Disabled Nodes: 1
194+
Disabled: true
196195
Filter: (t @@ '''wr'' | ''qh'''::tsquery)
197-
(5 rows)
196+
(4 rows)
198197

199198
SELECT count(*) FROM atsts WHERE t @@ 'wr|qh';
200199
count
@@ -237,11 +236,10 @@ SELECT count(*) FROM atsts WHERE d < '2016-05-16 14:21:25';
237236
QUERY PLAN
238237
-------------------------------------------------------------------------------
239238
Aggregate
240-
Disabled Nodes: 1
241239
-> Seq Scan on atsts
242-
Disabled Nodes: 1
240+
Disabled: true
243241
Filter: (d < 'Mon May 16 14:21:25 2016'::timestamp without time zone)
244-
(5 rows)
242+
(4 rows)
245243

246244
SELECT count(*) FROM atsts WHERE d < '2016-05-16 14:21:25';
247245
count
@@ -254,11 +252,10 @@ SELECT count(*) FROM atsts WHERE d > '2016-05-16 14:21:25';
254252
QUERY PLAN
255253
-------------------------------------------------------------------------------
256254
Aggregate
257-
Disabled Nodes: 1
258255
-> Seq Scan on atsts
259-
Disabled Nodes: 1
256+
Disabled: true
260257
Filter: (d > 'Mon May 16 14:21:25 2016'::timestamp without time zone)
261-
(5 rows)
258+
(4 rows)
262259

263260
SELECT count(*) FROM atsts WHERE d > '2016-05-16 14:21:25';
264261
count
@@ -275,14 +272,12 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY
275272
QUERY PLAN
276273
-------------------------------------------------------------------------------------
277274
Limit
278-
Disabled Nodes: 1
279275
-> Sort
280-
Disabled Nodes: 1
281276
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
282277
-> Seq Scan on atsts
283-
Disabled Nodes: 1
278+
Disabled: true
284279
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
285-
(8 rows)
280+
(6 rows)
286281

287282
SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;
288283
id | d | ?column?
@@ -299,14 +294,12 @@ SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY
299294
QUERY PLAN
300295
-------------------------------------------------------------------------------------
301296
Limit
302-
Disabled Nodes: 1
303297
-> Sort
304-
Disabled Nodes: 1
305298
Sort Key: ((d <=| 'Mon May 16 14:21:25 2016'::timestamp without time zone))
306299
-> Seq Scan on atsts
307-
Disabled Nodes: 1
300+
Disabled: true
308301
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
309-
(8 rows)
302+
(6 rows)
310303

311304
SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY d <=| '2016-05-16 14:21:25' LIMIT 5;
312305
id | d | ?column?
@@ -323,14 +316,12 @@ SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY
323316
QUERY PLAN
324317
-------------------------------------------------------------------------------------
325318
Limit
326-
Disabled Nodes: 1
327319
-> Sort
328-
Disabled Nodes: 1
329320
Sort Key: ((d |=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
330321
-> Seq Scan on atsts
331-
Disabled Nodes: 1
322+
Disabled: true
332323
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
333-
(8 rows)
324+
(6 rows)
334325

335326
SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY d |=> '2016-05-16 14:21:25' LIMIT 5;
336327
id | d | ?column?
@@ -347,13 +338,11 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts ORDER BY d <=> '2016-05-16
347338
QUERY PLAN
348339
-------------------------------------------------------------------------------------
349340
Limit
350-
Disabled Nodes: 1
351341
-> Sort
352-
Disabled Nodes: 1
353342
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
354343
-> Seq Scan on atsts
355-
Disabled Nodes: 1
356-
(7 rows)
344+
Disabled: true
345+
(5 rows)
357346

358347
SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;
359348
id | d | ?column?
@@ -370,12 +359,11 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER
370359
QUERY PLAN
371360
------------------------------------------------------------------------------------------------------------------------
372361
Sort
373-
Disabled Nodes: 1
374362
Sort Key: d
375363
-> Seq Scan on atsts
376-
Disabled Nodes: 1
364+
Disabled: true
377365
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d <= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
378-
(6 rows)
366+
(5 rows)
379367

380368
SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER BY d;
381369
id | d
@@ -423,12 +411,11 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER
423411
QUERY PLAN
424412
------------------------------------------------------------------------------------------------------------------------
425413
Sort
426-
Disabled Nodes: 1
427414
Sort Key: d
428415
-> Seq Scan on atsts
429-
Disabled Nodes: 1
416+
Disabled: true
430417
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
431-
(6 rows)
418+
(5 rows)
432419

433420
SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d;
434421
id | d
@@ -472,12 +459,11 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDE
472459
QUERY PLAN
473460
-------------------------------------------------------------------------------------------------------------------------
474461
Sort
475-
Disabled Nodes: 1
476462
Sort Key: d
477463
-> Seq Scan on atsts
478-
Disabled Nodes: 1
464+
Disabled: true
479465
Filter: ((t @@ '''wr'' & ''q'':*'::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
480-
(6 rows)
466+
(5 rows)
481467

482468
SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDER BY d;
483469
id | d

expected/altorder_hash.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* altorder_hash.out - test output for 64-bit systems and
77
* altorder_hash_1.out - test output for 32-bit systems.
88
*
9-
* Since c01743aa486 (>=18) EXPLAIN output was changed,
10-
* now it includes the number of disabled nodes
9+
* Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed,
10+
* now it shows whether nodes are disabled.
1111
*
1212
* altorder_hash_2.out - test output for 32-bit systems (>=18)
1313
*

expected/altorder_hash_1.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* altorder_hash.out - test output for 64-bit systems and
77
* altorder_hash_1.out - test output for 32-bit systems.
88
*
9-
* Since c01743aa486 (>=18) EXPLAIN output was changed,
10-
* now it includes the number of disabled nodes
9+
* Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed,
10+
* now it shows whether nodes are disabled.
1111
*
1212
* altorder_hash_2.out - test output for 32-bit systems (>=18)
1313
*

expected/altorder_hash_2.out

Lines changed: 20 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* altorder_hash.out - test output for 64-bit systems and
77
* altorder_hash_1.out - test output for 32-bit systems.
88
*
9-
* Since c01743aa486 (>=18) EXPLAIN output was changed,
10-
* now it includes the number of disabled nodes
9+
* Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed,
10+
* now it shows whether nodes are disabled.
1111
*
1212
* altorder_hash_2.out - test output for 32-bit systems (>=18)
1313
*
@@ -135,11 +135,10 @@ SELECT count(*) FROM atstsh WHERE t @@ 'wr|qh';
135135
QUERY PLAN
136136
---------------------------------------------------
137137
Aggregate
138-
Disabled Nodes: 1
139138
-> Seq Scan on atstsh
140-
Disabled Nodes: 1
139+
Disabled: true
141140
Filter: (t @@ '''wr'' | ''qh'''::tsquery)
142-
(5 rows)
141+
(4 rows)
143142

144143
SELECT count(*) FROM atstsh WHERE t @@ 'wr|qh';
145144
count
@@ -182,11 +181,10 @@ SELECT count(*) FROM atstsh WHERE d < '2016-05-16 14:21:25';
182181
QUERY PLAN
183182
-------------------------------------------------------------------------------
184183
Aggregate
185-
Disabled Nodes: 1
186184
-> Seq Scan on atstsh
187-
Disabled Nodes: 1
185+
Disabled: true
188186
Filter: (d < 'Mon May 16 14:21:25 2016'::timestamp without time zone)
189-
(5 rows)
187+
(4 rows)
190188

191189
SELECT count(*) FROM atstsh WHERE d < '2016-05-16 14:21:25';
192190
count
@@ -199,11 +197,10 @@ SELECT count(*) FROM atstsh WHERE d > '2016-05-16 14:21:25';
199197
QUERY PLAN
200198
-------------------------------------------------------------------------------
201199
Aggregate
202-
Disabled Nodes: 1
203200
-> Seq Scan on atstsh
204-
Disabled Nodes: 1
201+
Disabled: true
205202
Filter: (d > 'Mon May 16 14:21:25 2016'::timestamp without time zone)
206-
(5 rows)
203+
(4 rows)
207204

208205
SELECT count(*) FROM atstsh WHERE d > '2016-05-16 14:21:25';
209206
count
@@ -220,14 +217,12 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B
220217
QUERY PLAN
221218
-------------------------------------------------------------------------------------
222219
Limit
223-
Disabled Nodes: 1
224220
-> Sort
225-
Disabled Nodes: 1
226221
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
227222
-> Seq Scan on atstsh
228-
Disabled Nodes: 1
223+
Disabled: true
229224
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
230-
(8 rows)
225+
(6 rows)
231226

232227
SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;
233228
id | d | ?column?
@@ -244,14 +239,12 @@ SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B
244239
QUERY PLAN
245240
-------------------------------------------------------------------------------------
246241
Limit
247-
Disabled Nodes: 1
248242
-> Sort
249-
Disabled Nodes: 1
250243
Sort Key: ((d <=| 'Mon May 16 14:21:25 2016'::timestamp without time zone))
251244
-> Seq Scan on atstsh
252-
Disabled Nodes: 1
245+
Disabled: true
253246
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
254-
(8 rows)
247+
(6 rows)
255248

256249
SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER BY d <=| '2016-05-16 14:21:25' LIMIT 5;
257250
id | d | ?column?
@@ -268,14 +261,12 @@ SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B
268261
QUERY PLAN
269262
-------------------------------------------------------------------------------------
270263
Limit
271-
Disabled Nodes: 1
272264
-> Sort
273-
Disabled Nodes: 1
274265
Sort Key: ((d |=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
275266
-> Seq Scan on atstsh
276-
Disabled Nodes: 1
267+
Disabled: true
277268
Filter: (t @@ '''wr'' & ''qh'''::tsquery)
278-
(8 rows)
269+
(6 rows)
279270

280271
SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER BY d |=> '2016-05-16 14:21:25' LIMIT 5;
281272
id | d | ?column?
@@ -292,13 +283,11 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh ORDER BY d <=> '2016-05-16
292283
QUERY PLAN
293284
-------------------------------------------------------------------------------------
294285
Limit
295-
Disabled Nodes: 1
296286
-> Sort
297-
Disabled Nodes: 1
298287
Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone))
299288
-> Seq Scan on atstsh
300-
Disabled Nodes: 1
301-
(7 rows)
289+
Disabled: true
290+
(5 rows)
302291

303292
SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;
304293
id | d | ?column?
@@ -315,12 +304,11 @@ SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDE
315304
QUERY PLAN
316305
------------------------------------------------------------------------------------------------------------------------
317306
Sort
318-
Disabled Nodes: 1
319307
Sort Key: d
320308
-> Seq Scan on atstsh
321-
Disabled Nodes: 1
309+
Disabled: true
322310
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d <= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
323-
(6 rows)
311+
(5 rows)
324312

325313
SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER BY d;
326314
id | d
@@ -341,12 +329,11 @@ SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDE
341329
QUERY PLAN
342330
------------------------------------------------------------------------------------------------------------------------
343331
Sort
344-
Disabled Nodes: 1
345332
Sort Key: d
346333
-> Seq Scan on atstsh
347-
Disabled Nodes: 1
334+
Disabled: true
348335
Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone))
349-
(6 rows)
336+
(5 rows)
350337

351338
SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d;
352339
id | d

expected/array.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* array.out - test output for 64-bit systems and
77
* array_1.out - test output for 32-bit systems.
88
*
9-
* Since c01743aa486 (>=18) EXPLAIN output was changed,
10-
* now it includes the number of disabled nodes
9+
* Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed,
10+
* now it shows whether nodes are disabled.
1111
*
1212
* array_2.out - test output for 64-bit systems (>=18).
1313
* array_3.out - test output for 32-bit systems (>=18).

expected/array_1.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* array.out - test output for 64-bit systems and
77
* array_1.out - test output for 32-bit systems.
88
*
9-
* Since c01743aa486 (>=18) EXPLAIN output was changed,
10-
* now it includes the number of disabled nodes
9+
* Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed,
10+
* now it shows whether nodes are disabled.
1111
*
1212
* array_2.out - test output for 64-bit systems (>=18).
1313
* array_3.out - test output for 32-bit systems (>=18).

0 commit comments

Comments
 (0)