1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-25 20:23:07 +03:00

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.
This commit is contained in:
Tom Lane
2008-12-14 19:45:52 +00:00
parent b8753e5955
commit a9d5f30be3
3 changed files with 46 additions and 8 deletions

View File

@@ -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 $$