From: | Együd Csaba <csegyud(at)vnet(dot)hu> |
---|---|
To: | 'Stephan Szabo' <sszabo(at)megazone(dot)bigpanda(dot)com> |
Cc: | "'Pgsql-General(at)Postgresql(dot)Org (E-mail)'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Trigger isn't fired |
Date: | 2004-06-27 06:57:55 |
Message-ID: | 016601c45c14$136a9570$230a0a0a@compaq |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Stephan,
it was the problem, but not realy understand the reason. The documentetion
sais that perform doesn't porvide the return value and I thought I do not
need that. But I read absently, and didn't realized that the query to
perform must be a SELECT.
Thank you for opening my eyes. :) Now the trigger does its task. Thank you
very much.
Best regards,
-- Csaba Együd
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Stephan Szabo
> Sent: 2004. június 26. 22:32
> To: Együd Csaba
> Cc: Pgsql-General(at)Postgresql(dot)Org (E-mail)
> Subject: Re: [GENERAL] Trigger isn't fired
>
>
> 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 '
> > BEGIN
> > 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?
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com)
> Version: 6.0.707 / Virus Database: 463 - Release Date: 2004. 06. 15.
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com)
Version: 6.0.707 / Virus Database: 463 - Release Date: 2004. 06. 15.
From | Date | Subject | |
---|---|---|---|
Next Message | Ilia Kantor | 2004-06-27 09:31:43 | inner data format |
Previous Message | Alvaro Herrera | 2004-06-27 06:45:04 | Re: Datatype sizes; a space and speed issue? |