Firing trigger if only - Mailing list pgsql-hackers

From Gabriel
Subject Firing trigger if only
Date
Msg-id 1396525859084-5798484.post@n5.nabble.com
Whole thread Raw
Responses Re: Firing trigger if only  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
Good afternoon all.I have some problem with triggers on PostgreSQL 8.4.I have
a trigger on specific table(articles) that fires on update statement:

CREATE OR REPLACE FUNCTION trigger_articles_update() RETURNS trigger AS
$BODY$BEGIN      INSERT INTO
article_change(article_id,change_type)VALUES(OLD.article_id,2);  RETURN NULL; 
END$BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100;
ALTER FUNCTION trigger_articles_update() OWNER TO postgres;

I have 2 different applications that performs update on table
articles(written in Delphi and using ZeosDB). My problem is that I want
trigger to fire only when performing update with first application, but not
with second.I know that triggers supposed to fire on every change on table,
but this is a specific problem that I have.Any hint appreciated. 8)



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Firing-trigger-if-only-tp5798484.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add ALTER TABLESPACE ... MOVE command
Next
From: Hadi Moshayedi
Date:
Subject: PostgreSQL Columnar Store for Analytic Workloads