Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g768n-0008U1-3t for pgsql-general@arkaria.postgresql.org; Mon, 01 Oct 2018 21:54:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g768i-0003WL-NT for pgsql-general@arkaria.postgresql.org; Mon, 01 Oct 2018 21:54:04 +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.89) (envelope-from ) id 1g768i-0003WD-CR for pgsql-general@lists.postgresql.org; Mon, 01 Oct 2018 21:54:04 +0000 Received: from the-pojs.de ([2001:4ba0:fff1:c3::1] helo=jan-kohnert.de) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g768f-0006vg-1c for pgsql-general@lists.postgresql.org; Mon, 01 Oct 2018 21:54:03 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by b079.blue.fastwebserver.de (Postfix) with ESMTP id C66C5400E0991 for ; Mon, 1 Oct 2018 23:53:56 +0200 (CEST) X-Virus-Scanned: amavisd-new at jan-kohnert.de Received: from jan-kohnert.de ([127.0.0.1]) by localhost (jan-kohnert.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 7l42UxXdeydJ for ; Mon, 1 Oct 2018 23:53:55 +0200 (CEST) Received: from kohni-mobil.localnet (p200300CB872E383E7DD13032E17A391C.dip0.t-ipconnect.de [IPv6:2003:cb:872e:383e:7dd1:3032:e17a:391c]) by b079.blue.fastwebserver.de (Postfix) with ESMTPSA id 56C42400B19B9 for ; Mon, 1 Oct 2018 23:53:55 +0200 (CEST) From: Jan Kohnert To: pgsql-general@lists.postgresql.org Subject: Postgres 11 procedures and result sets Date: Mon, 01 Oct 2018 23:53:54 +0200 Message-ID: <10467048.Hd5HFnr8GS@kohni-mobil> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello List, I have a question regarding the new stored procedures in Postgres 11 (I tested beta4): I'd like to know if it is somehow possible to get a (or possibly more) result set from selects within the SP, as it is possible in MariaDB, MySQL, or SQL Server. What I found until now is to use inout-Parms. Then I have to define all columns in the select as inout-Params, but then I get only one line back, regardless how many lines >0 have been selected. I could also define an inout refcursor param, and parse that one, but that would make the new SP identical to the well known functions returning a refcursor. And when I use that approach, I have an additional step in Qt-Code for example, since I have to exec the SP, then parse to the refcursor result, exec the fetch and then parse the cursor output I'm interested in. Did I miss something? Thanks in advance! -- MfG Jan