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 1lIyA3-0004AN-VN for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Mar 2021 18:29:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lIyA2-00088Y-K6 for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Mar 2021 18:29:50 +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 1lIyA2-00088R-DQ for pgsql-hackers@lists.postgresql.org; Sun, 07 Mar 2021 18:29:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lIy9w-0005Jc-7K for pgsql-hackers@lists.postgresql.org; Sun, 07 Mar 2021 18:29:49 +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 127ITg6v1636063 for ; Sun, 7 Mar 2021 13:29:43 -0500 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: Why isn't pg_stat_get_subscription() marked as proretset? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1636061.1615141782.1@sss.pgh.pa.us> Date: Sun, 07 Mar 2021 13:29:42 -0500 Message-ID: <1636062.1615141782@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The code in pg_stat_get_subscription() appears to believe that it can return a set of rows, but its pg_proc entry does not have proretset set. It may be that this somehow accidentally fails to malfunction when the function is used via the system views, but if you try to call it directly it falls over: regression=# select pg_stat_get_subscription(0); ERROR: set-valued function called in context that cannot accept a set regards, tom lane