pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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/



view thread (10+ messages)  latest in thread

Message-ID: <20010920075846.84208.qmail@web10602.mail.yahoo.com>
Permalink:  ../20010920075846.84208.qmail@web10602.mail.yahoo.com/
Also on:    postgresql.org/message-id/20010920075846.84208.qmail@web10602.mail.yahoo.com

 · 

reply

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