summaryrefslogtreecommitdiff
path: root/src/test/regress/sql/polymorphism.sql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-12-14 19:46:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-12-14 19:46:02 +0000
commit4d2fa58aeab8866f983bbf5bee92df6656213029 (patch)
treeb6930ba7f056006d7d25f7a4200eab4a685942eb /src/test/regress/sql/polymorphism.sql
parent8d1d6019d4d85c51a4c414bb95a71f8897956218 (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.sql7
1 files changed, 7 insertions, 0 deletions
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;