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: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Stephan Szabo
> Sent: 2004. június 26. 22:32
> To: Együd Csaba
> Cc: [EMAIL PROTECTED] (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.



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to