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 20927D1B1F8 for ; Mon, 2 Aug 2004 17:48:19 -0300 (ADT) 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 10004-08 for ; Mon, 2 Aug 2004 20:48:15 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id C1257D1B181 for ; Mon, 2 Aug 2004 17:48:12 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i72KmCqb057835 for ; Mon, 2 Aug 2004 20:48:12 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i72KKFR9053388 for pgsql-sql@postgresql.org; Mon, 2 Aug 2004 20:20:15 GMT From: Jeff Boes User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 X-Newsgroups: comp.databases.postgresql.sql Subject: Trigger and function not on speaking terms Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 28 Message-ID: Date: Mon, 02 Aug 2004 16:20:15 -0400 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/16 X-Sequence-Number: 18513 Hmm, this is puzzling me: create or replace function fn_foo(text) returns trigger as ' begin # Do some stuff with $1 end; ' language 'plpgsql'; CREATE FUNCTION create table bar (aaa text); CREATE TABLE create trigger trg_bar after insert or update on bar execute procedure fn_foo('string'); ERROR: function fn_foo() does not exist It would seem my trigger definition is trying to find fn_foo(), when I mean for it to call fn_foo(TEXT). -- (Posted from an account used as a SPAM dump. If you really want to get in touch with me, dump the 'jboes' and substitute 'mur'.) ________ Jeffery Boes <>< jboes@qtm.net