The following bug has been logged online:
Bug reference: 6212
Logged by: Caleb Welton
Email address: Caleb.Welton@emc.com
PostgreSQL version: 9.0
Operating system: OSX
Description: PREPARE(pseudotype) should be blocked off
Details:
statements such as:
PREPARE p1(anyelement) AS SELECT quote_literal($1);
PREPARE p2(internal) AS SELECT int2recv($1);
Should not be allowed.
They can result in peculiar behavior such as the following:
execute p1('hello')
ERROR: cannot display a value of type anyelement