Re: weird cast behavior in "IN (values)" clause

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: weird cast behavior in "IN (values)" clause
Дата
Msg-id 27136.1309926249@sss.pgh.pa.us
обсуждение исходный текст
Ответ на weird cast behavior in "IN (values)" clause  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I am not sure why it would be valid to list two literals in the values
> but not one.

The discrepancy seems to be because transformAExprIn uses a different
type resolution method when there's more than one non-Var in the RHS.

Maybe we should apply select_common_type even when there's only one
RHS non-Var, even though we don't want to use a ScalarArrayOpExpr?

Curious that it's acted like this since 8.2 and nobody complained.
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: weird cast behavior in "IN (values)" clause
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Range Types, constructors, and the type system