Re: simple trigger question ... - Mailing list pgsql-sql

From Marc G. Fournier
Subject Re: simple trigger question ...
Date
Msg-id 20030403061142.V72033@hub.org
Whole thread Raw
In response to Re: simple trigger question ...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: simple trigger question ...
Re: simple trigger question ...
List pgsql-sql
On Wed, 2 Apr 2003, Tom Lane wrote:

> "Marc G. Fournier" <scrappy@hub.org> writes:
> > Okay, so I do have to create the FUNCTION first, I can't do it without?
>
> Check.
>
> > Can a TRIGGER pass an arg to the FUNCTION?
>
> Yes, but only simple constant strings.  (In this context, it might
> make sense for the CREATE TRIGGER command to tell the function the
> name of the specific sequence to increment.)

'K, that makes it workable ... final question (I hope!) ... RULEs vs
TRIGGERs?  I ended up doing it as a RULE, since I could do it without a
function ... but is there a reason why that is a Bad Idea?  Or in a case
like this, it doesn't really matter?



pgsql-sql by date:

Previous
From: Christoph Haller
Date:
Subject: Re: Syntax problem!
Next
From: "Jose Luis LG"
Date:
Subject: unsubscribe