Re: segfault with contrib lo

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: segfault with contrib lo
Дата
Msg-id 6436.1385265085@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: segfault with contrib lo  (Sawada Masahiko <sawada.mshk@gmail.com>)
Список pgsql-hackers
Sawada Masahiko <sawada.mshk@gmail.com> writes:
> On Mon, Oct 7, 2013 at 12:32 PM, Marc Cousin <cousinmarc@gmail.com> wrote:
>>> I was using the lo contrib a few days ago and wasn't paying attention, and
>>> forgot the "for each row" in the create trigger command... PostgreSQL
>>> segfaulted, when the trigger tried to access the row's attributes.
>>> 
>>> Please find attached a patch to control that the trigger is correctly
>>> defined (as in the example): a before trigger, for each row, and a
>>> parameter (if the parameter was omitted, it segfaulted too). I hope I did
>>> this correctly.

This looks good to me, except I see no reason for the trigger to refuse to
run as an AFTER trigger.  It works fine like that (I checked), and in some
scenarios people might prefer to do it that way to be sure they're seeing
the final version of the update.

> Sorry for late response.
> I tried the patch you attached.
> It is simple patch, and works fine.
> It is just my suggestion that error message shows name of trigger.

That seemed like a good idea to me, so I made all the errors (not
just the new ones) do it.

Committed and back-patched.
        regards, tom lane



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Freezing without write I/O
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Re: Server is not getting started with log level as debug5 on master after commit 3147ac