From: mariusz <marius@mtvk.pl>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: strange construct with RETURN within plpgsql
Date: Fri, 16 Feb 2018 14:08:04 +0100
Message-ID: <1518786484.10667.95.camel@mtvk.pl> (raw)
In-Reply-To: <CAKFQuwZ0iDTBbuhpScOvK4SjZRmFmxwk12ttjxqdxFPntMji5A@mail.gmail.com>
References: <1518784266.10667.82.camel@mtvk.pl>
<CAKFQuwZ0iDTBbuhpScOvK4SjZRmFmxwk12ttjxqdxFPntMji5A@mail.gmail.com>
On Fri, 2018-02-16 at 05:40 -0700, David G. Johnston wrote:
> On Fri, Feb 16, 2018 at 5:31 AM, mariusz <marius@mtvk.pl> wrote:
>
> so, if there is a reason for such a construct and it does
> something i
> didn't notice, please let me know what is the purpose of
> keyword RETURN
> after a valid statement.
>
>
>
> https://www.postgresql.org/docs/10/static/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNI...
>
yes, i know what RETURN does and when it does not exit from function
(like RETURN NEXT or RETURN QUERY), i know that part of docs, even read
that again and again before sending, but i must be blind, because i
cannot see any mention of
<statement> RETURN;
where that RETURN keyword does nothing (note the lack of ; before
return)
maybe knowing all that i just pass the docs too fast, but i honestly
cannot see why is this allowed.
the only similar thing which comes to my mind is a statement with
RETURNING ... clause within cte, but it's not the case here (nor the
same spelling)
regards, mj
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-general@postgresql.org
Cc: marius@mtvk.pl, david.g.johnston@gmail.com
Subject: Re: strange construct with RETURN within plpgsql
In-Reply-To: <1518786484.10667.95.camel@mtvk.pl>
References: <1518784266.10667.82.camel@mtvk.pl> <CAKFQuwZ0iDTBbuhpScOvK4SjZRmFmxwk12ttjxqdxFPntMji5A@mail.gmail.com> <1518786484.10667.95.camel@mtvk.pl>
* 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