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 1mxweQ-0007Vp-Ax for pgsql-general@arkaria.postgresql.org; Thu, 16 Dec 2021 19:42:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mxweP-0004dJ-8c for pgsql-general@arkaria.postgresql.org; Thu, 16 Dec 2021 19:42:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxweN-0004d5-In for pgsql-general@lists.postgresql.org; Thu, 16 Dec 2021 19:42:48 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxweF-0005pB-Eo for pgsql-general@lists.postgresql.org; Thu, 16 Dec 2021 19:42:47 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id ADE2A5C00DA; Thu, 16 Dec 2021 14:42:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 16 Dec 2021 14:42:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:mime-version:subject:to:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=S 2JJG670Ob07howJH2FHdqXlASfwAT0DLCjBNQ9Ex+0=; b=Fua96koG+g7RHx0b4 m9qUMvPueocYTbIoG8HV0YSynBEDqRcQpbG/yzG73ZgXOAd8Zut/Gnz+jVeuGTOC keH5Vh/qBxV4sbC9ejrNFmkR431LMaJCOLY9PlNaNeMAT6JGbaGHjTMfPiIEpI92 ifNPlEn3i4G4Ztm7BihawvAZJSJW/MeUUYL13KmxZx0metp0jGO44xL0FtFjDBGH +lOw4N2Z/ZcEfNjV0qgEVkMzob7NkeCHoer0VbbYH/G7sE6CbX9Jc2oFzAjwVPhZ huBFBMO6HtRfwOuWs9SN79r0qy64b/1Vvlg0INqut0eO/yhkXmNJLjliaCejwp0H M6tkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=S2JJG670Ob07howJH2FHdqXlASfwAT0DLCjBNQ9Ex +0=; b=bfA++Ad3qfHKJCpgiGQWPzeNg/Dtwo4RCPIyJTyBQwkktdhm287OhtaN9 mX3wr/GhtjhUiTvvPCADP0vlvAUXi72Iow9NHIYWCZWUidHD89vUalxkn+SY8r1v Bjb/ibMASiukOhAdDId24Z+2xAXjV3YC5UBN41GJ8y1bBL8iKvmP7ANkIT7T85fx Jildpwftb9QIWdYhHs69rUXDU2bbubyClpGsYmBPEafEb42/stOb/BTsdkMQZQoj vM41E6hbbdEwcj5QSoJwDnLUgf0ZMmwizNElPMgrfCyI4iC1g64hYpDkqq+041uF zet+kkASeM6MXfc7o3W+jE6KmvFJw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeggddufedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpedugfeuleegveffhfegleejhefhtedtgeeileeggfeh fefffeevgeejtdeutefftdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Dec 2021 14:42:35 -0500 (EST) Message-ID: <049b8a3b-90cf-3917-4b56-b06e5d47aea7@aklaver.com> Date: Thu, 16 Dec 2021 11:42:34 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: Packages, inner subprograms, and parameterizable anonymous blocks for PL/pgSQL Content-Language: en-US To: Bryn Llewellyn , pgsql-general list References: <48A5C07D-6A66-4B96-A48C-75C530CB9DCF@yugabyte.com> From: Adrian Klaver In-Reply-To: <48A5C07D-6A66-4B96-A48C-75C530CB9DCF@yugabyte.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/16/21 11:22, Bryn Llewellyn wrote: > Folks who develop applications for Oracle Database have had the features that the subject line of this email lists since the arrival of PL/SQL in the early nineties. The advantages are self-evident to these programmers; and their lack comes as a shocking disappointment when they start to write application code for PostgreSQL*. The absence of packages and inner subprograms is huge. The absence of parameterizable anonymous blocks is a smaller limitation. > > Notice that this point is entirely separable from the endeavor of migrating an extant application. It has first and foremost to do with how you think of designing code. > > I’ve heard rumors that some contributors to the PostgreSQL implementation are interested in bringing the PL/pgSQL features that I mentioned. If there is any such thinking, please let me know. I’m not a C coder but I’d be very interested in reader any ordinary prose that describes how these features might be exposed to the PostgreSQL application developer. Not following. To be exposed they have to exist and that is not the case in the community Postgres. The relevant question would seem to be, how do I get these features built? > ________________________________________________________________________________ > > * Full disclosure: I was the product manager for PL/SQL, working at Oracle HQ, from about 2000 through 2019 when I started with Yugabyte, Inc. At least some people on this list have heard of YugabyteDB and know that it uses Postgres’s SQL processing code “as is” (currently Version 11.2, but presently Version 13) on top of its own implementation of a distributed storage layer (inspired by Google Spanner). > > > -- Adrian Klaver adrian.klaver@aklaver.com