Re: array support patch phase 1 patch

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: array support patch phase 1 patch
Дата
Msg-id 3EDA1E34.4010300@joeconway.com
обсуждение исходный текст
Ответ на Re: array support patch phase 1 patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: array support patch phase 1 patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:
> That is surely not what you intended.  The test must be whether arg1 and
> arg2 are (separately) coercible to the operator's two input types.
> Moreover, the test must not be symmetric, any more than
> IsBinaryCoercible is.  You can coerce int[] to ANYARRAY but not vice
> versa.

Dooh! Yeah, I can see that now.

>
> A bigger problem is that I doubt this will actually work.  Most of the
> places that call compatible_oper will then proceed to call the function
> from specialized code that does not bother with consing up an expression
> tree --- so a polymorphic function is going to fail anyway...

Well, not necessarily in the case of array_type-to-ANYARRAY. In that
case the element type information in the array itself gives the function
all the context it needs (if it looks there, which in the case of
array_eq at least it does). Maybe it makes sense to only allow the
array_type-to-ANYARRAY case?

Joe


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: array support patch phase 1 patch
Следующее
От: Joe Conway
Дата:
Сообщение: Re: array support patch phase 1 patch