Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWPjK-00053A-5i for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jan 2018 16:47:58 +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 1eWPjJ-0001FC-Op for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jan 2018 16:47:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eWPjJ-0001F2-IO for pgsql-hackers@lists.postgresql.org; Tue, 02 Jan 2018 16:47:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eWPjA-0005GT-Rj for pgsql-hackers@postgresql.org; Tue, 02 Jan 2018 16:47:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w02GljoK011026; Tue, 2 Jan 2018 11:47:46 -0500 From: Tom Lane To: Robert Haas cc: Peter Eisentraut , pgsql-hackers Subject: Re: [HACKERS] SQL procedures In-reply-to: References: <336f6926-8990-ff2d-4167-276ce417fc32@2ndquadrant.com> <9388.1509474184@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 02 Jan 2018 11:40:26 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11023.1514911665.1@sss.pgh.pa.us> Date: Tue, 02 Jan 2018 11:47:45 -0500 Message-ID: <11024.1514911665@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > I agree that we need this, but using prorettype = InvalidOid to do it > might not be the best way, because it only works for procedures that > don't return anything. If a procedure could return, say, an integer, Good point, because that is possible in some other systems, and so somebody is going to ask for it at some point. > Anyway, I think it would be better to invent an explicit way to > represent whether something is a procedure rather than relying on > overloading prorettype to tell us. +1 --- seems like a new bool column is the thing. Or may we should merge "proisprocedure" with proisagg and proiswindow into an enum prokind? Although that would break some existing client-side code. PS: I still strongly disagree with allowing prorettype to be zero. regards, tom lane