Re: Re: Fixing bug #8228 ("set-valued function called in context that cannot accept a set")

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: Fixing bug #8228 ("set-valued function called in context that cannot accept a set")
Дата
Msg-id 29773.1389064996@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fixing bug #8228 ("set-valued function called in context that cannot accept a set")  (David Johnston <polobo@yahoo.com>)
Ответы Re: Fixing bug #8228 ("set-valued function called in context that cannot accept a set")  (David Johnston <polobo@yahoo.com>)
Список pgsql-hackers
David Johnston <polobo@yahoo.com> writes:
> The whole "varchar/varchar(30)" discrepancy is bothersome and since the
> example forces a function-call via the use of "lower(...)", and doesn't test
> the non-function situation, I am concerned this patch is incorrect.

The reason casting to varchar(30) fails is that that results in invocation
of a function (to enforce the length limit).  Casting to varchar is just a
RelabelType operation, which doesn't have two different code paths for
set and not-set inputs.

I did check the patch against your original example, but I thought using
lower() made the purpose of the regression test case more apparent.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Get more from indices.
Следующее
От: David Johnston
Дата:
Сообщение: Re: Fixing bug #8228 ("set-valued function called in context that cannot accept a set")