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

Re: Trigger isn't fired

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Együd Csaba <csegyud(at)vnet(dot)hu>
Cc: "Pgsql-General(at)Postgresql(dot)Org (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trigger isn't fired
Date: 2004-06-26 20:31:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Sat, 26 Jun 2004, [iso-8859-2] Együd Csaba wrote:

> Hi,
> I created a trigger function and a trigger with that function on a table. It
> is an "after insert or update or delete" trigger, in which I want to modify
> a second table regardless of the current modifications.
> Everything seems to be good on modifying the table, no error messages. After
> the modifications the second table isn't modified at all. Should anybody
> suggest me what I'm doing wrong? Does a trigger functon send error messages
> if it fails?
> My statements:
> --------------
> CREATE OR REPLACE FUNCTION trg_upd_prod_instock() RETURNS trigger AS '
>   perform ''update t_products set
> getup_instock=get_stock_getup(''||quote_literal(NEW.productid)||'',1) where
> id=''||quote_literal(NEW.productid);

I don't think this is going to do what you want.  Are you sure you didn't
want EXECUTE rather than PERFORM?

In response to


pgsql-general by date

Next:From: Ilia KantorDate: 2004-06-26 21:38:33
Subject: VACUUM technical question
Previous:From: Cao, WenhongDate: 2004-06-26 20:14:41
Subject: Extract data from MySQL database using PostgreSQL

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