Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 01:38 AM
Daniel Schuchardt
Guest
 
Posts: n/a
Default Postgres 8.0 -> BEGIN EXCEPTION END Syntax????

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.

thnx

Daniel
  #2  
Old November 23rd, 2005, 01:38 AM
Gaetano Mendola
Guest
 
Posts: n/a
Default Re: Postgres 8.0 -> BEGIN EXCEPTION END Syntax????

Daniel Schuchardt wrote:
[color=blue]
> 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.[/color]

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

WHEN OTHERS THEN PERFORM 0;



Regards
Gaetano Mendola



 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles