Thanks for the reply.
I was hoping to avoid using C. Am I correct about
my assumption that having, say, 30 IF..END IF blocks
in one trigger is more efficient (in terms of
execution speed and server load) than 5 update
triggers per table?
I'm just wondering if it's worth the effort to do it
in C or just use lots of plpgsql triggers.
Pat Marchant
On Thu, Dec 20, 2001 at 06:31:47PM -0500, Tom Lane wrote:
> Pat Marchant <patmarchant@lvcablemodem.com> writes:
> > if (AttributeExists(new.updated))
> > { new.updated = 'now'::datetime;}
>
> I don't know any good way to do this in plpgsql. It'd be moderately
> straightforward in C, however, since you could look at the tuple
> descriptor for the relation to see if there is a field named updated.
>