Re: [HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Tom Lane
Heikki Linnakangas writes: > Tom Lane wrote: >> Aside from the question of Oracle compatibility, ISTM this behavior >> is at variance with what our manual says about EXIT: >> >> If no label is given, the innermost loop is terminated and the >> statement following END LOOP is executed next. > lat

Re: [HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Heikki Linnakangas
Tom Lane wrote: Whilst fooling with some plpgsql code translated from Oracle, I found out that we interpret this construct differently than they do: while true loop begin -- some code that might throw unique_violation exit; excepti

Re: [HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Andrew Dunstan
Tom Lane wrote: Whilst fooling with some plpgsql code translated from Oracle, I found out that we interpret this construct differently than they do: while true loop begin -- some code that might throw unique_violation exit; excep

Re: [HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Pavel Stehule
2009/4/30 Tom Lane : > Whilst fooling with some plpgsql code translated from Oracle, I found > out that we interpret this construct differently than they do: > >        while true loop >            begin >                -- some code that might throw unique_violation > >                exit; >    

[HACKERS] plpgsql's EXIT versus block and loop nesting

2009-05-01 Thread Tom Lane
Whilst fooling with some plpgsql code translated from Oracle, I found out that we interpret this construct differently than they do: while true loop begin -- some code that might throw unique_violation exit; exception when unique_vio