X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 678A73A4F54 for ; Fri, 7 Jan 2005 20:45:09 +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 07518-01 for ; Fri, 7 Jan 2005 20:44:42 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id B6BC23A4FA4 for ; Fri, 7 Jan 2005 20:44:47 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j07KiWIK044724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jan 2005 13:44:34 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j07KiWM0091397; Fri, 7 Jan 2005 13:44:32 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j07KiVmx091396; Fri, 7 Jan 2005 13:44:32 -0700 (MST) (envelope-from mfuhr) Date: Fri, 7 Jan 2005 13:44:31 -0700 From: Michael Fuhr To: "Florian G. Pflug" Cc: pgsql-general@postgresql.org Subject: Re: Problem creating trigger-function with arguments (8.0rc4) Message-ID: <20050107204431.GA91345@winnie.fuhr.org> References: <41DEEA4C.8090903@phlo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41DEEA4C.8090903@phlo.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/261 X-Sequence-Number: 71210 On Fri, Jan 07, 2005 at 09:00:12PM +0100, Florian G. Pflug wrote: > CREATE OR REPLACE FUNCTION functions.t_insert_deny(v_message text) > RETURNS "trigger" AS $$ See the "Trigger Procedures" section of the PL/pgSQL documentation. The first paragraph contains this: 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. > If I replace RETURNS "trigger" with e.g. RETURNS "int8" it works... > Is this is a bug, or has something regarding triggerfunctions and > parameters changed in 8.0 Changed since when? Are you saying this worked in an older version of PostgreSQL? If so, what version? The paragraph I quoted above goes back to at least 7.2. -- Michael Fuhr http://www.fuhr.org/~mfuhr/