X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D7F2C52A9F for ; Mon, 21 Mar 2005 08:02:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93731-06 for ; Mon, 21 Mar 2005 08:02:09 +0000 (GMT) Received: from anchor-post-36.mail.demon.net (anchor-post-36.mail.demon.net [194.217.242.86]) by svr1.postgresql.org (Postfix) with ESMTP id A4A3F52A56 for ; Mon, 21 Mar 2005 08:02:08 +0000 (GMT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-36.mail.demon.net with esmtp (Exim 4.42) id 1DDHrT-000JCR-MY; Mon, 21 Mar 2005 08:02:08 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 86C47164D5; Mon, 21 Mar 2005 08:02:06 +0000 (GMT) Message-ID: <423E7F7D.9030404@archonet.com> Date: Mon, 21 Mar 2005 08:02:05 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: lucas@presserv.org Cc: pgsql-sql@postgresql.org Subject: Re: Trigger with parameters References: <20050318161058.34vug165zg9c8o88@www.presserv.org> In-Reply-To: <20050318161058.34vug165zg9c8o88@www.presserv.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.061 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/275 X-Sequence-Number: 20754 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