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
Marcin Krawczyk escribió:
> 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;
Try something like th
no, you can use CONTINUE only in loop. When you wont ignore exception,
just do nothing
For example, the following two fragments of code are equivalent:
BEGIN
y := x / 0;
EXCEPTION
WHEN division_by_zero THEN
NULL; -- ignore the error
END;
BEGIN
Hi Scott,
I add the answers below.
>
> Just wondering what the query plans look like here, both regular
> explain, and if you can wait for it to execute, explain analyze.
>
Just with explain, because the function craches when it is running:
"Merge Join (cost=141.41..188.32 rows=1 width=24)"
"
Thank you guys.
Alvaro your idea works tha way I wanted. Why didn't I think about it ? :)
regards
mk
Hello,
I have some tables that continually collect statistics, and then over time are
pruned as the stats are aggregated into more useful formats.
For some of these tables, it it is fore-seeable that the associated sequences
would be incremented past the max value of the "int" type in the norma
Mark Stosberg wrote:
>
> Hello,
>
> I have some tables that continually collect statistics, and then over time are
> pruned as the stats are aggregated into more useful formats.
>
> For some of these tables, it it is fore-seeable that the associated sequences
> would be incremented past the max
On Tue, 8 Jul 2008 17:20:13 -0400
Alvaro Herrera <[EMAIL PROTECTED]> wrote:
> Mark Stosberg wrote:
> >
> > Hello,
> >
> > I have some tables that continually collect statistics, and then over time
> > are
> > pruned as the stats are aggregated into more useful formats.
> >
> > For some of the
Mark Stosberg wrote:
> On Tue, 8 Jul 2008 17:20:13 -0400
> Alvaro Herrera <[EMAIL PROTECTED]> wrote:
>
> > 3. Deal with wraparound by ensuring that the applications behave sanely
>
> Wrap-around?
>
> Exceeding the max size of "int" looks more like a brick wall than wrap-around
> to me:
>
>