public inbox for [email protected]
help / color / mirror / Atom feedFrom: Robert Haas <[email protected]>
To: Josh Kupershmidt <[email protected]>
Cc: pgsql-docs <[email protected]>
Subject: Re: lo_manage trigger on updates
Date: Mon, 10 Oct 2011 13:18:56 -0400
Message-ID: <CA+TgmoZQEbFFRR9X25azdBMpWcYx6RDncTODF0hOcR9GYRz0dw@mail.gmail.com> (raw)
In-Reply-To: <CAK3UJRHaEuzfnZaxarcV8=RP1sC5xLxumzqx6iiyqpJVS89rjw@mail.gmail.com>
References: <CAK3UJRHaEuzfnZaxarcV8=RP1sC5xLxumzqx6iiyqpJVS89rjw@mail.gmail.com>
On Thu, Aug 11, 2011 at 11:43 PM, Josh Kupershmidt <[email protected]> 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
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: lo_manage trigger on updates
In-Reply-To: <CA+TgmoZQEbFFRR9X25azdBMpWcYx6RDncTODF0hOcR9GYRz0dw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox