pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: SQL procedures
Date: Wed, 8 Nov 2017 10:08:39 -0500
Message-ID: <f650fbc3-7179-9d80-9b5b-e64f3bb78e38@2ndquadrant.com> (raw)
In-Reply-To: <CAFj8pRDz0WrBEOA02dqPQ_BOtfFbRQOQNGXrEyszW49BnGBMQQ@mail.gmail.com>
References: <336f6926-8990-ff2d-4167-276ce417fc32@2ndquadrant.com>
	<CAFj8pRBUuzCxV_iOpxpJ9QOpVVzmA2=Y=i_Dq6FrNOvLF9VJpQ@mail.gmail.com>
	<30d523bb-19d6-35f0-970c-b2bc5ff27b18@2ndquadrant.com>
	<CAFj8pRAnWbUcp3sPvrLSq7xrsnao5SGOW9ma=zyNq6_xpUHRtw@mail.gmail.com>
	<CAFj8pRDz0WrBEOA02dqPQ_BOtfFbRQOQNGXrEyszW49BnGBMQQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



view thread (57+ messages)  latest in thread

Message-ID: <f650fbc3-7179-9d80-9b5b-e64f3bb78e38@2ndquadrant.com>
Permalink:  ../f650fbc3-7179-9d80-9b5b-e64f3bb78e38@2ndquadrant.com/
Also on:    postgresql.org/message-id/f650fbc3-7179-9d80-9b5b-e64f3bb78e38@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, pavel.stehule@gmail.com
  Subject: Re: SQL procedures
  In-Reply-To: <f650fbc3-7179-9d80-9b5b-e64f3bb78e38@2ndquadrant.com>
  References: <336f6926-8990-ff2d-4167-276ce417fc32@2ndquadrant.com> <CAFj8pRBUuzCxV_iOpxpJ9QOpVVzmA2=Y=i_Dq6FrNOvLF9VJpQ@mail.gmail.com> <30d523bb-19d6-35f0-970c-b2bc5ff27b18@2ndquadrant.com> <CAFj8pRAnWbUcp3sPvrLSq7xrsnao5SGOW9ma=zyNq6_xpUHRtw@mail.gmail.com> <CAFj8pRDz0WrBEOA02dqPQ_BOtfFbRQOQNGXrEyszW49BnGBMQQ@mail.gmail.com> <f650fbc3-7179-9d80-9b5b-e64f3bb78e38@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox