Heikki Linnakangas <heikki.linnakan...@enterprisedb.com> writes:
> I'm starting to wonder if it's worth enforcing the rule that all unknown 
> Params must be coerced to the same target type. We could just document 
> the behavior. Or maybe we should revert the whole thing, and add a check 
> to PL/pgSQL EXECUTE USING code to just throw a nicer error message if 
> you pass an unknown parameter in the USING clause.

+1 for the latter.  There's no good reason to be passing unknowns to USING.
I'm also getting more and more uncomfortable with the amount of new
behavior that's being pushed into an existing SPI call.

Another possibility is for EXECUTE USING to coerce any unknowns to TEXT
before it calls the parser at all.  This would square with the typical
default assumption for unknown literals, and it would avoid having to
have any semantics changes below the SPI call.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to