Re: PL/pgSQL EXECUTE '..' USING with unknown
От | Tom Lane |
---|---|
Тема | Re: PL/pgSQL EXECUTE '..' USING with unknown |
Дата | |
Msg-id | 9204.1281918943@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: PL/pgSQL EXECUTE '..' USING with unknown (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>) |
Ответы |
Re: PL/pgSQL EXECUTE '..' USING with unknown
|
Список | pgsql-hackers |
Heikki Linnakangas <heikki.linnakangas@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
В списке pgsql-hackers по дате отправления: