Re: Unexpected behavior with transition tables in update statementtrigger

Поиск
Список
Период
Сортировка
От Tom Kazimiers
Тема Re: Unexpected behavior with transition tables in update statementtrigger
Дата
Msg-id 20180226151520.7imta6ogcjl227tr@dewberry.localdomain
обсуждение исходный текст
Ответ на Re: Unexpected behavior with transition tables in update statement trigger  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-general
Hi Thomas,

On Mon, Feb 26, 2018 at 11:15:44PM +1300, Thomas Munro wrote:
>On Sat, Feb 24, 2018 at 4:47 PM, Tom Kazimiers <tom@voodoo-arts.net> wrote:
>Thanks for the reproducer.  Yeah, that seems to be a bug.
>nodeNamedTuplestorescan.c allocates a new read pointer for each
>separate scan of the named tuplestore, but it doesn't call
>tuplestore_select_read_pointer() so that the two scans that appear in
>your UNION ALL plan are sharing the same read pointer.  At first
>glance the attached seems to fix the problem, but I'll need to look
>more carefully tomorrow.

Thanks very much for investigating this. I can confirm that applying 
your patch results in the tuples I expected in both my test trigger and 
my actual trigger function.

It would be great if this or a similar fix would make it into the next 
official release.

Cheers,
Tom


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

Предыдущее
От: Abhra Kar
Дата:
Сообщение: merge statement gives error
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: merge statement gives error