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 B771E3A5027 for ; Fri, 7 Jan 2005 21:58:23 +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 15466-02 for ; Fri, 7 Jan 2005 21:58:07 +0000 (GMT) Received: from fetter.org (dsl092-188-065.sfo1.dsl.speakeasy.net [66.92.188.65]) by svr1.postgresql.org (Postfix) with ESMTP id 7BCFD3A5005 for ; Fri, 7 Jan 2005 21:58:12 +0000 (GMT) Received: from fetter.org (localhost.localdomain [127.0.0.1]) by fetter.org (8.13.1/8.12.10) with ESMTP id j07M08xJ018160; Fri, 7 Jan 2005 14:00:08 -0800 Received: (from shackle@localhost) by fetter.org (8.13.1/8.13.1/Submit) id j07M07Td018159; Fri, 7 Jan 2005 14:00:07 -0800 Date: Fri, 7 Jan 2005 14:00:07 -0800 From: David Fetter To: Tom Lane Cc: "Florian G. Pflug" , pgsql-general@postgresql.org Subject: Re: Problem creating trigger-function with arguments (8.0rc4) Message-ID: <20050107220007.GC16967@fetter.org> References: <41DEEA4C.8090903@phlo.org> <29386.1105131135@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29386.1105131135@sss.pgh.pa.us> User-Agent: Mutt/1.4.2i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.052 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/267 X-Sequence-Number: 71216 On Fri, Jan 07, 2005 at 03:52:15PM -0500, Tom Lane wrote: > "Florian G. Pflug" 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@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote!