diff options
| author | Tom Lane | 2008-12-14 19:45:52 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-12-14 19:45:52 +0000 |
| commit | a9d5f30be328fb83f0667b8a60df00a30d934fb2 (patch) | |
| tree | d552f96a1f72d1821d222b3653a457e8e7e9f294 /src/test/regress/sql/polymorphism.sql | |
| parent | b8753e5955db8735107eb769fa0004b9f28a0c4e (diff) | |
Restore enforce_generic_type_consistency's pre-8.3 behavior of allowing an
actual argument type of ANYARRAY to match an argument declared ANYARRAY,
so long as ANYELEMENT etc aren't used. I had overlooked the fact that this
is a possible case while fixing bug #3852; but it is possible because
pg_statistic contains columns declared ANYARRAY. Per gripe from Corey Horton.
Diffstat (limited to 'src/test/regress/sql/polymorphism.sql')
| -rw-r--r-- | src/test/regress/sql/polymorphism.sql | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/regress/sql/polymorphism.sql b/src/test/regress/sql/polymorphism.sql index 56f90c597a8..6c7b1813f94 100644 --- a/src/test/regress/sql/polymorphism.sql +++ b/src/test/regress/sql/polymorphism.sql @@ -427,6 +427,13 @@ create aggregate build_group(int8, integer) ( STYPE = int8[] ); +-- check that we can apply functions taking ANYARRAY to pg_stats +select distinct array_ndims(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; + -- test variadic polymorphic functions create function myleast(variadic anyarray) returns anyelement as $$ |
