Re: Pl/pgSQL trigger failing and i ant see why

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Maurice Walshe <maurice(dot)walshe(at)poptel(dot)coop>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Pl/pgSQL trigger failing and i ant see why
Date: 2002-07-25 16:04:06
Message-ID: 20020725090229.W48685-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 24 Jul 2002, Maurice Walshe wrote:

> HI all
>
> I have read the skimpy docs on postgres triggers and whilst I can
> get a simple trigger working when I try to call a Pl/pgsql function
> to return the value I want to set one of the foields in NEW to it wont
> work.
>
> immediateparentid_ is INT4
>
> This fails NEW.immediateparentid_ := FindRealParent(NEW.messageid_) ;
> This works NEW.immediateparentid_ := 123456 ;
>
> Here are the function's btw I have tested the interactivlky so they
> are returning coorect values.
>

What are you getting as an error when you insert to the table?

> Any one got any ideas? BTW WTF does postgres hide its logs?

General logs? That depends on your configuration. You either should
be redirecting output/error from postmaster to somewhere or having
it go to syslog.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2002-07-25 16:22:13 Re: erserver
Previous Message Lamar Owen 2002-07-25 16:00:13 Re: [GENERAL] regression test