Re: Error message with plpgsql CONTINUE

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Error message with plpgsql CONTINUE
Date: 2015-08-22 00:27:05
Message-ID: 55D7C1D9.4010801@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-08-22 00:33:56 Re: Memory allocation in spi_printtup()
Previous Message Tom Lane 2015-08-22 00:21:58 Re: Error message with plpgsql CONTINUE