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 1lJQcZ-0006Vy-AV for pgsql-general@arkaria.postgresql.org; Tue, 09 Mar 2021 00:53:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lJQcX-0005O4-Vr for pgsql-general@arkaria.postgresql.org; Tue, 09 Mar 2021 00:53:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJQcX-0005Nw-O6 for pgsql-general@lists.postgresql.org; Tue, 09 Mar 2021 00:53:09 +0000 Received: from ook.raf.org ([139.99.156.21]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lJQcQ-0002mm-P0 for pgsql-general@lists.postgresql.org; Tue, 09 Mar 2021 00:53:08 +0000 Received: from localhost (localhost [127.0.0.1]) by ook.raf.org (Postfix) with ESMTP id 828FE5DE30; Tue, 9 Mar 2021 11:53:00 +1100 (AEDT) X-Virus-Scanned: Debian amavisd-new at ook.raf.org Received: from ook.raf.org ([127.0.0.1]) by localhost (ook.raf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id svetgN9Ts-5Y; Tue, 9 Mar 2021 11:53:00 +1100 (AEDT) Received: by ook.raf.org (Postfix, from userid 1001) id 10BE65E4FA; Tue, 9 Mar 2021 11:53:00 +1100 (AEDT) Date: Tue, 9 Mar 2021 11:53:00 +1100 From: raf To: Tom Lane Cc: Adrian Klaver , "Bysani, Ram" , "pgsql-general@lists.postgresql.org" Subject: Re: Need help with clarification on stored procedure support in PostGreSQL database Message-ID: <20210309005300.gdp2kjoy6bjwynaa@raf.org> References: <29836c19-5321-7093-bc88-a82c6a497a36@aklaver.com> <20210308222228.gljiuauwdd4p3kxs@raf.org> <1932630.1615246316@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1932630.1615246316@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Mar 08, 2021 at 06:31:56PM -0500, Tom Lane wrote: > raf writes: > > Is there any important different between a stored procedure and > > a stored function that returns void? I've been using functions > > for everything but calling them procedures in my head (even though > > most of them do return a value or result set). > > A procedure can commit or rollback a transaction (and then start > a new one). > > regards, tom lane thanks. cheers, raf