On 11/8/17 09:33, Pavel Stehule wrote:
>     We can create auto session variable STATUS. This variable can be 0
>     if procedure was returned without explicit RETURN value. Or it can
>     hold different value specified by RETURN expr.
>     This value can be read by GET DIAGNOSTICS xxx = STATUS
>     or some similar.
> The motivation is allow some mechanism cheaper than our exceptions.

I suppose this could be a separately discussed feature.  We'd also want
to consider various things that PL/pgSQL pretends to be compatible with.

One of the main motivations for procedures is to do more complex and
expensive things including transaction control.  So saving exception
overhead is not really on the priority list there.

Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to