Received: from mail1.hub.org (webmail.hub.org [216.126.85.1]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8K878e41680 for ; Thu, 20 Sep 2001 04:07:08 -0400 (EDT) (envelope-from faisalchouhan@yahoo.com) Received: from web10602.mail.yahoo.com (web10602.mail.yahoo.com [216.136.130.166]) by mail1.hub.org (8.11.3/8.11.4) with SMTP id f8K7wmD33510 for ; Thu, 20 Sep 2001 03:58:48 -0400 (EDT) (envelope-from faisalchouhan@yahoo.com) Message-ID: <20010920075846.84208.qmail@web10602.mail.yahoo.com> Received: from [210.56.11.169] by web10602.mail.yahoo.com via HTTP; Thu, 20 Sep 2001 00:58:46 PDT Date: Thu, 20 Sep 2001 00:58:46 -0700 (PDT) From: Mohammad Faisal Subject: Trigger Problem To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200109/166 X-Sequence-Number: 4846 hey all I have created a function that is used in a trigger. -------------------------------------------------- -------------------------------------------------- CREATE TRIGGER tr_insert_on_a AFTER INSERT OR UPDATE ON A FOR EACH ROW EXECUTE PROCEDURE fn_insert_on_a(); -------------------------------------------------- -------------------------------------------------- CREATE function fn_insert_on_a() RETURNS OPAQUE AS ' BEGIN INSERT INTO B name, a_ref VALUES (NEW.name,NEW.id); RETURN NEW; END; ' LANGUAGE 'plpgsql'; I am getting following error. ERROR : Unrecognized language specified in a CREATE FUNCTION: plpgsql. Recognized languages are sql,c,internal and the created procedure languages. NOTE: I have studied in documenatation that only plpgsql functions are written to be used in triggers. any help in this regard. thanks in advance. Faisal __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/