Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCREE-0006kJ-MQ for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Nov 2017 14:21:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eCREE-00033z-96 for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Nov 2017 14:21:18 +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 1eCRED-00033p-Nh for pgsql-hackers@postgresql.org; Wed, 08 Nov 2017 14:21:17 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eCRE6-0001ZS-OY for pgsql-hackers@postgresql.org; Wed, 08 Nov 2017 14:21:16 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5C73020DDF; Wed, 8 Nov 2017 09:21:08 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Wed, 08 Nov 2017 09:21:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Id+I/n xqzwdblUeAX+6Qi/xYQS0D4PWeF1F0oTrXcFA=; b=KjBWXcYrdyhjSyJFcvDfmG Bjv2lctg15ahVp162Sl9c9MxZZfptcJKxFNDUtBrX1RsJtzU+LykM06oLHp/HZ2d zNX1vkvYeHz5gFlmJVyxk65mssVSmtpoPiJjyEsodqThE+yQsPOZYsenJx6e1Cxz pbTSqtKzB/5NIiiCMcPfNxrEz/QPmrMb+q71ffq5ebOGvTzqSj1e/l0tYYwyUrDv jk8QyyV31EOfiPnyJbyo6McOKgL5lnBUOL/7aHF6xTZWn1PKy2g9iQ5V4uRP62Kv tKzzrut239Oh38Zc39EE4I2jPnt/OwrrBwEFlZrRmThtoCN9dBxJniwcSLKDMZPw == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 19348245A8; Wed, 8 Nov 2017 09:21:08 -0500 (EST) Subject: Re: SQL procedures To: Tom Lane References: <336f6926-8990-ff2d-4167-276ce417fc32@2ndquadrant.com> <9388.1509474184@sss.pgh.pa.us> Cc: pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Wed, 8 Nov 2017 09:21:11 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <9388.1509474184@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 10/31/17 14:23, Tom Lane wrote: > Putting 0 in prorettype seems like a pretty bad idea. It seemed like the natural thing to do, since we use a zero OID to indicate "nothing" in many other places. > Why not use VOIDOID for the prorettype value? We need a way to distinguish functions that are callable by SELECT and procedures that are callable by CALL. > Or if there is some reason why "void" isn't the > right pseudotype, maybe you should invent a new one, analogous to the > "trigger" and "event_trigger" pseudotypes. I guess that would be doable, but I think it would make things more complicated without any gain that I can see. In the case of the pseudotypes you mention, those are the actual types mentioned in the CREATE FUNCTION command. If we invented a new pseudotype, that would run the risk of existing code creating nonsensical reverse compilations like CREATE FUNCTION RETURNS PROCEDURE. Catalog queries using prorettype == 0 would behave sensibly by default. For example, an inner or outer join against pg_type would automatically make sense. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers