On Sat, Jul 26, 2014 at 8:39 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Basically my point is that this just seems like inventing another way to > do what one can already do with RAISE, and it doesn't have much redeeming > social value to justify the cognitive load of inventing another construct.
The main difference is with RAISE EXCEPTION 'OK'; you cannot know if it was *your* line of code which throw the 'OK'-exception or if it came from some other function which was called in the block of code. This means with the current way you have to inspect all lines of code in all functions in the entire call graph for the block of code for which you want to capture the 'OK'-exception (or whatever name one wishes to use), alternatively to use a name which is guaranteed to be unique, such as a UUID or something which no other line of code could possibly emmit as an exception. Both approaches are ugly and hackish. I think the language should provide a documented and safe way of exiting from a begin block without having to worry about other code raising exceptions of the same name. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers