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 1lomnK-0002Ks-Mz for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Jun 2021 12:49:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lomnH-0001qU-Ob for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Jun 2021 12:49:51 +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 1lomnG-0001qM-V1 for pgsql-hackers@lists.postgresql.org; Thu, 03 Jun 2021 12:49:51 +0000 Received: from forward2-smtp.messagingengine.com ([66.111.4.226]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lomn7-0003qB-Ub for pgsql-hackers@lists.postgresql.org; Thu, 03 Jun 2021 12:49:50 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailforward.nyi.internal (Postfix) with ESMTP id 08E3B1940D19; Thu, 3 Jun 2021 08:49:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 03 Jun 2021 08:49:39 -0400 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=o+Uq2B+X6x4ZmyUDT5EI/4ghWxwHSiLHOlOf3zq62 60=; b=bfMBtw21DITbSSQhsgGmIytgHDMu3dfYt/peouw0GQ4WT3y7hZuQdnvCg 1Jslzq1MkHNYmcRBtir3L89K6PLAl/fVkeGI2jDY5lI669zUGBOXunwpygsB9H7b sp7+jEdDVak3u63c+LGUQ7AdFtfPvb/ekckJZ6rqIciKvV0qcIddVVgZ3jOPy98B M/8ajl8CW+g9/zQKgukmnDIJQRZw4Q1FlA933phQ7OyAvyIDqmnmF10po3S9UHro sBp8ccc2NITrhmRsDRUGXrX39ekuplYPJt5BftFAZ87TLqnp29bnjOeRld1yQJzG Cwftk4WdFAFmusW06jwNJQy0qXo6g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdelledgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhephfdtlefhkedtgeffhfdt lefhveffudetueefgeetvdduvdefieehvdeuheeileevnecuffhomhgrihhnpehquhgrlh hifhhivggurdhnrghmvgenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvug gsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Jun 2021 08:49:36 -0400 (EDT) Subject: Re: Support for CREATE MODULE? To: Jim Mlodgenski , Tom Lane Cc: PostgreSQL Hackers References: <2897116.1622642280@sss.pgh.pa.us> From: Peter Eisentraut Message-ID: <7008facb-7558-ff47-13cd-96d5392f8f5a@enterprisedb.com> Date: Thu, 3 Jun 2021 14:49:35 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 02.06.21 16:43, Jim Mlodgenski wrote: >> It's already quite hard to tell which part >> of a multiply.qualified.name is which, given that SQL says that you can >> optionally put a "catalog" (database) name in front of the others. >> I really doubt there is a way to shoehorn sub-schemas in there without >> creating terrible ambiguities. Is "a.b.c" a reference to object c in >> schema b in database a, or is it a reference to object c in sub-schema b >> in schema a? > That was the area I had the most difficult part to reason about. I tried to make > some simplifying assumptions by checking if "a" was the current database. > Since we don't support cross database access, if it was not, I assumed "a" > was a schema. I not sure if that would be valid, but it did scope things > to a more manageable problem. Given that, as you said, the concept of modules is in the SQL standard, there is surely some guidance in there about how this is supposed to affect name resolution. So let's start with that. Maybe we won't like it in the end or whatever, but we should surely look there first.