Firing trigger if only

Поиск
Список
Период
Сортировка
От Gabriel
Тема Firing trigger if only
Дата
Msg-id 1396525859084-5798484.post@n5.nabble.com
обсуждение исходный текст
Ответы Re: Firing trigger if only  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add ALTER TABLESPACE ... MOVE command
Следующее
От: Hadi Moshayedi
Дата:
Сообщение: PostgreSQL Columnar Store for Analytic Workloads