Re: Postgres 8.0 -> BEGIN EXCEPTION END Syntax????

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Daniel Schuchardt <daniel_schuchardt(at)web(dot)de>
Subject: Re: Postgres 8.0 -> BEGIN EXCEPTION END Syntax????
Date: 2004-08-13 22:54:08
Message-ID: 411D4690.2080304@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message j0rd1 adame 2004-08-13 22:55:38 Re: [ok] Re: psql wishlist: value completion
Previous Message gnari 2004-08-13 21:31:04 Re: Autoincremental value

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2004-08-13 22:58:12 Re: Calling PL functions with named parameters
Previous Message Gaetano Mendola 2004-08-13 22:49:28 Re: hot spare / log shipping work on