Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf12423d

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

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/test/regress/expected/polymorphism.out

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ select distinct array_ndims(histogram_bounds) from pg_stats
433433
where histogram_boundsis not null;
434434

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

438439
-- test variadic polymorphic functions
439440

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp