Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1emfvt-0004lu-Hi for pgsql-general@arkaria.postgresql.org; Fri, 16 Feb 2018 13:20:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emfvs-00018r-If for pgsql-general@arkaria.postgresql.org; Fri, 16 Feb 2018 13:20:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1emfvs-00017w-7O for pgsql-general@lists.postgresql.org; Fri, 16 Feb 2018 13:20:08 +0000 Received: from mailout.toya.net.pl ([217.113.224.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1emfvp-0001Gw-Ud for pgsql-general@postgresql.org; Fri, 16 Feb 2018 13:20:07 +0000 Received: from mail.toya.net.pl (unknown [10.9.9.167]) by mail.toya.net.pl (Postfix) with ESMTP id CBF32182F05 for ; Fri, 16 Feb 2018 14:20:03 +0100 (CET) Received: by mail.toya.net.pl (Postfix, from userid 114) id C7EBD182EFF; Fri, 16 Feb 2018 14:20:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on newLazir-deb8.toya.net.pl X-Spam-Level: X-Spam-Status: No, score=-203.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, USER_IN_WHITELIST autolearn=ham autolearn_force=no version=3.4.0 Received: from marlap (unknown [172.17.16.148]) (Authenticated sender: marius@mtvk.pl) by mail.toya.net.pl (Postfix) with ESMTPA id 6ED49182EFE; Fri, 16 Feb 2018 14:20:03 +0100 (CET) Message-ID: <1518787203.10667.105.camel@mtvk.pl> Subject: Re: strange construct with RETURN within plpgsql From: mariusz To: Pavel Stehule Cc: pgsql-general Date: Fri, 16 Feb 2018 14:20:03 +0100 In-Reply-To: References: <1518784266.10667.82.camel@mtvk.pl> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TOYA-AV-Checked: YES List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 2018-02-16 at 13:51 +0100, Pavel Stehule wrote: > It is not a bug, it is feature. Sometimes not nice. RETURN is keyword > in procedural part, but it is nothing in sql part. > thanks, i haven't thought about such an obvious thing, i feel really ashamed. of course it makes sense now. i guess what mislead me was that statement var := val and forgetting that it's like select into under the hood, and even when i put strict select into in examples i didn't spot this (it must have been a very long week and i definitely need some rest) thanks again regards, mj