Skip site navigation (1) Skip section navigation (2)

Postgres Triggers issue

From: u235sentinel <u235sentinel(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Postgres Triggers issue
Date: 2010-02-11 04:15:51
Message-ID: 4B738477.80107@gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
I have a strange problem we noticed the other day with triggers.  We're 
running 8.3.3 on Solaris 10 (intel) and have a feed that comes in 
regularly to populate a table we're working on.  The feed works just 
fine inserting rows however the following trigger stops the feed until 
we remove the trigger.  Any thoughts on what I'm doing wrong here?

Thanks!

---

CREATE OR REPLACE FUNCTION r.m_t()
RETURNS trigger AS
$BODY$
BEGIN
 INSERT INTO temp_m_t VALUES (NEW.*,1+1);
RETURN NULL;
END;
$BODY$
LANGUAGE 'plpgsql';


CREATE TRIGGER tafter
AFTER INSERT OR UPDATE
ON r.m_a
FOR EACH ROW
EXECUTE PROCEDURE r.m_t();


Responses

pgsql-novice by date

Next:From: A. KretschmerDate: 2010-02-11 07:06:55
Subject: Re: Postgres Triggers issue
Previous:From: Tom LaneDate: 2010-02-11 02:11:57
Subject: Re: Question about commit

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group