Re: Trigger with parameters - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Trigger with parameters
Date
Msg-id 423E7F7D.9030404@archonet.com
Whole thread Raw
In response to Trigger with parameters  (lucas@presserv.org)
List pgsql-sql
lucas@presserv.org wrote:
>  CREATE TRIGGER products_codes_checkfieldvalue BEFORE INSERT OR UPDATE ON
> main.products_codes FOR EACH ROW EXECUTE PROCEDURE
> trigger_system_checkfieldvalue('main','products_codes');
>    -------  ERROR:  function trigger_system_checkfieldvalue() does not exist
> 
> But the function trigger_system_checkfieldvalue() EXIST! With (text,text)
> parameters.
> I can't built the trigger for this table (main.products_codes) using the check
> field in main_system.products_codes.
>  What is wrong???
From the manuals:
Note that the function must be declared with no arguments even if it 
expects to receive arguments specified in CREATE TRIGGER --- trigger 
arguments are passed via TG_ARGV, as described below.

See pl/pgsql - trigger procedures for details.

--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: "Chandan_Kumaraiah"
Date:
Subject: equivalent of oracle rank() in postgres
Next
From: Richard Huxton
Date:
Subject: Re: date subtraction