Re: Endless For Loop in an insert trigger

From: Richard Huxton <dev(at)archonet(dot)com>
To: Luis Agostinho <luis(dot)agostinho(at)consumo-pt(dot)coop>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Endless For Loop in an insert trigger
Date: 2004-06-25 08:46:43
Message-ID: 40DBE673.6020708@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Luis Agostinho wrote:
> Hello
> I?m using this function to be executed within an after insert trigger, but
> the part of code above wich is "painted" by blue gets in an endless loop.
> I could use some help

Luis - not sure what you mean by "painted by blue", but there are some
basic steps I always use when debugging triggers:
1. Put RAISE NOTICE messages throughout the code
2. Turn statement logging on in my postgresql.conf

Note that you must do:
RAISE NOTICE ''My var = % which is nice'', my_var;
and _not_
RAISE NOTICE ''My var = '' || my_var || '' which is nice'';

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2004-06-25 09:38:22 Re: [GENERAL] tsearch2,pgsql 7.4.[1|2], pg_dump problem
Previous Message Achilleus Mantzios 2004-06-25 06:08:13 tsearch2,pgsql 7.4.[1|2], pg_dump problem