Re: Problem creating trigger-function with arguments (8.0rc4)

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Problem creating trigger-function with arguments (8.0rc4)
Date: 2005-01-07 22:00:07
Message-ID: 20050107220007.GC16967@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 07, 2005 at 03:52:15PM -0500, Tom Lane wrote:
> "Florian G. Pflug" <fgp(at)phlo(dot)org> writes:
> > This is what I tried:
>
> > CREATE OR REPLACE FUNCTION functions.t_insert_deny(v_message text)
> > RETURNS "trigger" AS $$
>
> There should probably be a specific error check telling you that a
> trigger function can't take any explicit arguments. But there isn't
> (and it's too late for 8.0 because we froze error message strings
> long since :-().
>
> The CREATE TRIGGER parameter comes to the trigger function via
> TGARGS, not as a regular parameter.

Um, so how would one write a trigger that takes arguments? I stubbed
my toe on this in re: dbi-link, and would like to be able to write a
trigger with arguments :)

Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tzahi Fadida 2005-01-07 22:01:02 Re: ERROR: cache lookup failed for type 0
Previous Message Astha Raj 2005-01-07 21:27:13 unsubscribe