Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f12423d

Browse files
committed
Adjust regression test to avoid platform-dependent failure.
We have a test that verifies that max(anyarray) will cope if the array column elements aren't all the same array type. However, it's now possible for that to produce a collation-related error message instead of the expected one, if the first two column elements happen to be of the same type and it's one that expects to be given collation info. Tweak the test to ensure this doesn't happen. Per buildfarm member pika.
1 parent b051a34 commit f12423d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/regress/expected/polymorphism.out

+2-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,8 @@ where histogram_bounds is not null;
623623
(1 row)
624624

625625
-- such functions must protect themselves if varying element type isn't OK
626-
select max(histogram_bounds) from pg_stats;
626+
-- (WHERE clause here is to avoid possibly getting a collation error instead)
627+
select max(histogram_bounds) from pg_stats where tablename = 'pg_am';
627628
ERROR: cannot compare arrays of different element types
628629
-- test variadic polymorphic functions
629630
create function myleast(variadic anyarray) returns anyelement as $$

src/test/regress/sql/polymorphism.sql

+2-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ select distinct array_ndims(histogram_bounds) from pg_stats
433433
where histogram_bounds is not null;
434434

435435
-- such functions must protect themselves if varying element type isn't OK
436-
select max(histogram_bounds) from pg_stats;
436+
-- (WHERE clause here is to avoid possibly getting a collation error instead)
437+
select max(histogram_bounds) from pg_stats where tablename = 'pg_am';
437438

438439
-- test variadic polymorphic functions
439440

0 commit comments

Comments
 (0)