Re: [PATCHES] plpgsql, return can contains any expression

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] plpgsql, return can contains any expression
Дата
Msg-id 24714.1158332218@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] plpgsql, return can contains any expression  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Ответы Re: [PATCHES] plpgsql, return can contains any expression  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Список pgsql-hackers
"Pavel Stehule" <pavel.stehule@hotmail.com> writes:
>> This patch doesn't seem to cope with cases where the supplied tuple has
>> the wrong number of columns, and it doesn't look like it's being careful
>> about dropped columns either.  Also, that's a mighty bizarre-looking
>> choice of cache memory context in coerce_to_tuple ... but then again,
>> why are you bothering with a cache at all for temporary arrays?

> I am sorry, Tom. But I don't understand. I can check number of columns,
> ofcourse and I'll do it. What cache for temporary arrays do you mean?

I thought that making coerce_to_tuple depend on estate->err_func was
pretty bizarre, and that there was no need for any "cache" at all for
arrays that need only live as long as the function runs.  All you are
saving here is a palloc/pfree cycle, which is not worth the obscurantism
and risk of bugs (are you sure natts can never change?).

BTW, if you want this patch to make it into 8.2, it needs to be fixed
and resubmitted *very* soon.

            regards, tom lane

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

Предыдущее
От: "Rocco Altier"
Дата:
Сообщение: Re: [PATCHES] Linking on AIX (Was: Fix linking of OpenLDAP libraries )
Следующее
От: "D'Arcy J.M. Cain"
Дата:
Сообщение: Re: New version of money type