Re: [HACKERS] SQL procedures - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] SQL procedures
Date
Msg-id f650fbc3-7179-9d80-9b5b-e64f3bb78e38@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] SQL procedures  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
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:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] SQL procedures
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] SQL procedures