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/

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to