Re: Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the
Дата
Msg-id 26494.1282225637@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: proposal: tuplestore, tuplesort aggregate functions
Следующее
От: Boxuan Zhai
Дата:
Сообщение: gSoC add MERGE command new patch -- merge_v104