Re: lo_manage trigger on updates

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: lo_manage trigger on updates
Дата
Msg-id CA+TgmoZQEbFFRR9X25azdBMpWcYx6RDncTODF0hOcR9GYRz0dw@mail.gmail.com
обсуждение исходный текст
Ответ на lo_manage trigger on updates  (Josh Kupershmidt <schmiddy@gmail.com>)
Ответы Re: lo_manage trigger on updates  (Josh Kupershmidt <schmiddy@gmail.com>)
Re: lo_manage trigger on updates  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-docs
On Thu, Aug 11, 2011 at 11:43 PM, Josh Kupershmidt <schmiddy@gmail.com> wrote:
> I think the doc section about using lo_manage() as a trigger:
>   http://www.postgresql.org/docs/current/static/lo.html
>
> could have its example tweaked to use a column-level BEFORE UPDATE
> trigger, so as to save unnecessary trigger firings. Something like the
> attached, perhaps?

Uh, wow.  That syntax is horribly surprising, isn't it?  My eyes want
to parse it as:

BEFORE (UPDATE OF raster) OR (DELETE ON image)

...which is totally wrong.

I'm inclined to think that maybe we should leave that example as-is,
and maybe add the variant you're proposing as a second example,
showing how the basic version can be refined.

> On a similar note, the warning on that page about truncates could be
> softened if we extended the lo_manage() function to handle truncates,
> and set it up as on ON TRUNCATE trigger as well.

Patch?  :-)

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

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: typo on libpq.sgml
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Link to PAM pages broken