Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPoS8-00017P-Fx for pgsql-general@arkaria.postgresql.org; Mon, 13 Sep 2021 16:05:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mPoS7-0002Ls-EY for pgsql-general@arkaria.postgresql.org; Mon, 13 Sep 2021 16:05:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPoS7-0002La-5f for pgsql-general@lists.postgresql.org; Mon, 13 Sep 2021 16:05:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPoRw-0001ig-VV for pgsql-general@lists.postgresql.org; Mon, 13 Sep 2021 16:05:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 18DG4mKf423908; Mon, 13 Sep 2021 12:04:48 -0400 From: Tom Lane To: Pavel Stehule cc: Herwig Goemans , pgsql-general Subject: Re: ERROR: control reached end of function without RETURN, except, it is not a function it is a procedure or a nameless block. In-reply-to: References: <868ae948-e3ca-c7ec-95a6-83cfc08ef750@gmail.com> Comments: In-reply-to Pavel Stehule message dated "Mon, 13 Sep 2021 13:44:10 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <423906.1631549088.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 13 Sep 2021 12:04:48 -0400 Message-ID: <423907.1631549088@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Stehule writes: > po 13. 9. 2021 v 13:23 odesílatel Herwig Goemans > napsal: >> I get an error in a stored procedure - not a stored function mind you - >> control reached end of function without RETURN >> The error occurs when doing an exit