Heikki Linnakangas <heikki.linnakan...@enterprisedb.com> writes: > One approach is to handle the conversion from unknown to the right data > type transparently in the backend. Attached patch adds a > coerce-param-hook for fixed params that returns a CoerceViaIO node to > convert the param to the right type at runtime. That's quite similar to > the way unknown constants are handled.
The idea of using a coerce_hook instead of inventing several new API layers is attractive, but have you checked that there are no callers for which this would be a bad idea? Another issue is that this fails to mimic the usual varparams behavior that a Param of unknown type should be resolved to only one type when it is referenced in multiple places. I'm not sure that that's a critical behavior, but I'm definitely not sure that it's not. 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