Re: Trigger question
| От | Pat Marchant |
|---|---|
| Тема | Re: Trigger question |
| Дата | |
| Msg-id | 20011220224726.GA18149@lvcablemodem.com обсуждение исходный текст |
| Ответ на | Re: Trigger question (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-novice |
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.
>
В списке pgsql-novice по дате отправления: