Re: Error message with plpgsql CONTINUE - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Error message with plpgsql CONTINUE
Date
Msg-id 55D7C1D9.4010801@BlueTreble.com
Whole thread Raw
In response to Re: Error message with plpgsql CONTINUE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 8/21/15 7:21 PM, Tom Lane wrote:
> Applied with some fixes.  The major oversight was that EXIT does*not*
> have the same rules as CONTINUE, as is clearly documented (though in your
> defense, there was no regression test verifying the behavior ... there is
> now).

Yay more tests.

>> >I refactored the 3
>> >places that were doing the check into exec_stmt_block(), renaming the
>> >original function exec_stmt_block_rc for the one place that still needs
>> >the return code.
> I did not like that part.  Simpler and less code churn to just take out
> the now-unnecessary outer-level tests.  Also, your way lost the separate
> error texts for "control reached end of function" and "control reached end
> of trigger procedure", which while maybe not very important was not an
> agreed-to change.

Guess I didn't look hard enough at what I was removing. I was of two 
minds on the refactoring anyway.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: PostgreSQL for VAX on NetBSD/OpenBSD
Next
From: Tom Lane
Date:
Subject: Re: Memory allocation in spi_printtup()