From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Josh Kupershmidt <schmiddy(at)gmail(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: lo_manage trigger on updates |
Date: | 2012-08-15 03:22:20 |
Message-ID: | 20120815032220.GC25473@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Mon, Oct 10, 2011 at 01:18:56PM -0400, Robert Haas wrote:
> On Thu, Aug 11, 2011 at 11:43 PM, Josh Kupershmidt <schmiddy(at)gmail(dot)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.
I have implemented this suggestion with the attached, applied patch to
9.3.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
lo.diff | text/x-diff | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2012-08-15 03:25:49 | Re: lo_manage trigger on updates |
Previous Message | Chris Travers | 2012-08-15 02:34:50 | Re: Would like to contribute a section to docs for 9.3. Where to start? |