Re: simple trigger question ...

From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: simple trigger question ...
Date: 2003-04-03 10:12:55
Message-ID: 20030403061142.V72033@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, 2 Apr 2003, Tom Lane wrote:

> "Marc G. Fournier" <scrappy(at)hub(dot)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?

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jose Luis LG 2003-04-03 11:21:00 unsubscribe
Previous Message =?ISO-8859-1?Q?Antti_Ij=E4s?= 2003-04-03 09:16:40 Foreign key from another database