Repair incorrect check for coercion of unknown literal to ANYARRAY, a bug

Tom Lane <tgl@sss.pgh.pa.us>

Commit: dc167085f3e4eb129e82dfe17f95dc42997c997a
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-10-11T20:21:19Z
Releases: 8.0.9
Repair incorrect check for coercion of unknown literal to ANYARRAY, a bug
I introduced in 7.4.1 :-(.  It's correct to allow unknown to be coerced to
ANY or ANYELEMENT, since it's a real-enough data type, but it most certainly
isn't an array datatype.  This can cause a backend crash but AFAICT is not
exploitable as a security hole.  Per report from Michael Fuhr.

Note: as fixed in HEAD, this changes a constant in the pg_stats view,
resulting in a change in the expected regression outputs.  The back-branch
patches have been hacked to avoid that, so that pre-existing installations
won't start failing their regression tests.

Files

PathChange+/−
src/backend/parser/parse_coerce.c modified +22 −5