From: Mohammad Faisal <faisalchouhan@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Trigger Problem
Date: Thu, 20 Sep 2001 00:58:46 -0700 (PDT)
Message-ID: <20010920075846.84208.qmail@web10602.mail.yahoo.com> (raw)
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: faisalchouhan@yahoo.com
Subject: Re: Trigger Problem
In-Reply-To: <20010920075846.84208.qmail@web10602.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox