Re: final patch - plpgsql: for-in-array

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: final patch - plpgsql: for-in-array
Дата
Msg-id AANLkTi=iQu5ULNjO+L9OzPbQOseJ55r5c-atHbytAu2-@mail.gmail.com
обсуждение исходный текст
Ответ на Re: final patch - plpgsql: for-in-array  (Valentine Gogichashvili <valgog@gmail.com>)
Список pgsql-hackers
On Mon, Nov 22, 2010 at 6:21 AM, Valentine Gogichashvili
<valgog@gmail.com> wrote:
> Hi,
> with the FOR e IN SELECT UNNEST(a) construct there is an issue again related
> to the unresting of composite type arrays:
> [ example ]
> Is it a bug or a feature?

It looks like the problem in this example is that PL/pgsql tries to
assign the result of unest(ta) to t.i rather than to t as a whole.
This is pretty ridiculously stupid in this case, but it would make
sense if the subselect where of the form SELECT a, b, c FROM ...

I haven't looked at the code to see whether there's a way to make this
case smarter (it would be nice - I've been bitten by similar problems
myself) but it's only tangentially related to the patch under
discussion.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: final patch - plpgsql: for-in-array