diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/polymorphism.out | 11 | ||||
-rw-r--r-- | src/test/regress/sql/polymorphism.sql | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/test/regress/expected/polymorphism.out b/src/test/regress/expected/polymorphism.out index a208203c6d3..5741b075be9 100644 --- a/src/test/regress/expected/polymorphism.out +++ b/src/test/regress/expected/polymorphism.out @@ -613,3 +613,14 @@ create aggregate build_group(int8, integer) ( SFUNC = add_group, STYPE = int8[] ); +-- check that we can apply functions taking ANYARRAY to pg_stats +select distinct array_eq(histogram_bounds,histogram_bounds) from pg_stats +where histogram_bounds is not null; + array_eq +---------- + t +(1 row) + +-- such functions must protect themselves if varying element type isn't OK +select max(histogram_bounds) from pg_stats; +ERROR: cannot compare arrays of different element types diff --git a/src/test/regress/sql/polymorphism.sql b/src/test/regress/sql/polymorphism.sql index 2df963952f4..015443ce22c 100644 --- a/src/test/regress/sql/polymorphism.sql +++ b/src/test/regress/sql/polymorphism.sql @@ -426,3 +426,10 @@ create aggregate build_group(int8, integer) ( SFUNC = add_group, STYPE = int8[] ); + +-- check that we can apply functions taking ANYARRAY to pg_stats +select distinct array_eq(histogram_bounds,histogram_bounds) from pg_stats +where histogram_bounds is not null; + +-- such functions must protect themselves if varying element type isn't OK +select max(histogram_bounds) from pg_stats; |