Re: Dyamic updates of NEW with pl/pgsql - Mailing list pgsql-hackers

From David Fetter
Subject Re: Dyamic updates of NEW with pl/pgsql
Date
Msg-id 20100313173102.GN15080@fetter.org
Whole thread Raw
In response to Re: Dyamic updates of NEW with pl/pgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Mar 13, 2010 at 12:18:32PM -0500, Tom Lane wrote:
> Merlin Moncure <mmoncure@gmail.com> writes:
> > ... It just doesn't seem right that you should have to write N
> > trigger functions over N tables to a highly related operations.
> > pl/perl is a huge dependency to bring in just to able to do things
> > this.  I understand hacking things through the text route is
> > possibly not a direction should be encouraged...but is there an
> > alternative?  Is it theoretically possible to write functions that
> > can switch out types based on context while still having static
> > plans?
> 
> [ after a little bit of reflection ]
> 
> ISTM that in most cases where this is a serious issue, the trigger
> functions are doing the *same* thing to different tables.

Yes.  Well, at least the same base type.  I don't suppose now is a
great time to get into the second class status of domains. :P

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Dyamic updates of NEW with pl/pgsql
Next
From: Andrew Dunstan
Date:
Subject: Re: Dyamic updates of NEW with pl/pgsql