Re: No return from trigger function

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: "James B(dot) Byrne" <byrnejb(at)harte-lyne(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: No return from trigger function
Date: 2009-04-08 20:05:29
Message-ID: 20090408200529.GA24021@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 08, 2009 at 03:59:22PM -0400, James B. Byrne wrote:
> EXCEPTION
> WHEN unique_violation THEN
> -- NULL -- do nothing
>
> RETURN NULL; -- AFTER trigger results are ignored anyway
> END;

exception is part of begin/exception/end; block
so you will need one more begin and one more end;

Best regards,

depesz

--
Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/
jid/gtalk: depesz(at)depesz(dot)com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Mayer 2009-04-08 20:05:55 Re: Are there performance advantages in storing bulky field in separate table?
Previous Message James B. Byrne 2009-04-08 19:59:22 No return from trigger function