Re: Postgres 8.0 -> BEGIN EXCEPTION END Syntax???? - Mailing list pgsql-general

From Gaetano Mendola
Subject Re: Postgres 8.0 -> BEGIN EXCEPTION END Syntax????
Date
Msg-id 411D4690.2080304@bigfoot.com
Whole thread Raw
In response to Postgres 8.0 -> BEGIN EXCEPTION END Syntax????  (Daniel Schuchardt <daniel_schuchardt@web.de>)
List pgsql-general
Daniel Schuchardt wrote:

 > Hi ,
 >
 > can anybody tell me the postgres - syntax for begin excepion end if I
 > want to ignore the error?
 >
 > BEGIN
 >  exception ...
 > EXCEPTION
 >  WHEN OTHERS THEN ?????????????what to write for do nothing?????????
 > END;
 >
 > in oracle it's
 >
 > WHEN OTHERS THEN null; but this syntax doesn't work in postgres.

This for sure is not the best solution, but try:

WHEN OTHERS THEN PERFORM 0;



Regards
Gaetano Mendola




pgsql-general by date:

Previous
From: j0rd1 adame
Date:
Subject: Re: [ok] Re: psql wishlist: value completion
Next
From: "gnari"
Date:
Subject: Re: Autoincremental value