exception handling and CONTINUE

From: "Marcin Krawczyk" <jankes(dot)mk(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: exception handling and CONTINUE
Date: 2008-07-08 12:24:57
Message-ID: 95f6bf9b0807080524i3a1f1c36nda2d0c89c2abdd56@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all. Can anyone tell me if there's a way to use CONTINUE clause outside
the loop ?
An example :

FOR a IN SELECT * FROM xxx
LOOP

INSERT INTO yyy VALUES (a.***, ..)

END LOOP;

EXCEPTION WHEN unique_violation THEN CONTINUE;

I get an error saying I can't use CONTINUE outside of a loop. Is there a way
around this ?

regards
mk

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2008-07-08 13:06:29 Re: exception handling and CONTINUE
Previous Message Scott Marlowe 2008-07-07 21:14:00 Re: how to control the execution plan ?