Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHvLP-00AqDf-OV for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Dec 2024 01:35:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tHvLM-00Cjgk-08 for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Dec 2024 01:35:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHvLK-00Cjgb-Ke for pgsql-hackers@lists.postgresql.org; Mon, 02 Dec 2024 01:35:20 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHvLH-000Zc7-RF for pgsql-hackers@lists.postgresql.org; Mon, 02 Dec 2024 01:35:18 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.phl.internal (Postfix) with ESMTP id 8F1B81140102; Sun, 1 Dec 2024 20:35:14 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Sun, 01 Dec 2024 20:35:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1733103314; x=1733189714; bh=E+42wJ6Kuo 5UTpRJllZr+H277LZqcjhihrkJ0Wps6RM=; b=IVi6WYzkOImmhB6L8cJ4H7Ourg oUAz7Tp5ugQAFAFZe+ccbJIYjkK0zH1Ofbt+83n/CNPAIfyaO+pe9irXlzfef+Q4 bMTnZlz2pbaGMRGGpfsCO3zlbxpFXrjd9Py0iGalFsg9O+eRGJUL8U2XMwnO6n8q aXvpzqIjd3CS4shtnWY6SpTh6nmWwSidvp+IYzAEVHHhyZe9zIrPtLCUISMTXIls YGo/d1vImPOq5x1KXowKbJu96fjtE/quUYiciGmPHQz0gn1Lq3SQdzT6KGBvPdh8 s4tnidwRw8Xy13qPDX5JdD+8p2zegEmg2gm6n5FPdDiJ6Jdfwgt0KOdhO0ug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1733103314; x=1733189714; bh=E+42wJ6Kuo5UTpRJllZr+H277LZqcjhihrk J0Wps6RM=; b=MwFiW68QfsY/VKl9CRNeJVO4WhFxgjlv8ZS0QRdFnRsig0Bfb3a QobudgUsHXFpADyY4TdaHAsdTHWIZ5ek/l9AICKPqKpFmcpDwNbBGkpKIaYTm8US OzO93NSO8q3ltpbHqnouxnuqLnkBAo9vzuo5INOfxHbeAOMEfuEWuLhiX9gDvqoL WaaWoIej4Hts7PDrTrbMoA95MC4aQwexchpRayoipy5AnyICsrtNWZQUoR4Hou6u MW5TMYsnqRdW9FH8SL+5E94FfkrIQgkh7rz16UQ4XYHlwEUTi3EZNvx6jZJkz9fp g3gQSvZAQXqqD4veCjOC7wVS7nU8r9WImxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrheekgdefiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhgg tggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoe hmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleei fedufffhhfdtteelgeeggeffhfekueevteeigfduudevudetgfegiedvjeenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehp rghquhhivghrrdighiiipdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuth dprhgtphhtthhopehtghhlsehsshhsrdhpghhhrdhprgdruhhspdhrtghpthhtohepjhhi rghnrdhunhhivhgvrhhsrghlihhthiesghhmrghilhdrtghomhdprhgtphhtthhopehrvg hshhhkvghkihhrihhllhesghhmrghilhdrtghomhdprhgtphhtthhopehpvghtvghrsegv ihhsvghnthhrrghuthdrohhrghdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhsse hlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 1 Dec 2024 20:35:11 -0500 (EST) Date: Mon, 2 Dec 2024 10:34:57 +0900 From: Michael Paquier To: Tom Lane Cc: jian he , Kirill Reshke , Peter Eisentraut , PostgreSQL Hackers Subject: Re: CREATE SCHEMA ... CREATE DOMAIN support Message-ID: References: <2007224.1732773174@sss.pgh.pa.us> <1075425.1732993688@sss.pgh.pa.us> <1220935.1733009604@sss.pgh.pa.us> <1273964.1733032384@sss.pgh.pa.us> <1353043.1733072243@sss.pgh.pa.us> <1488327.1733092220@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pKAi9xf+sAyL0eBc" Content-Disposition: inline In-Reply-To: <1488327.1733092220@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --pKAi9xf+sAyL0eBc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Dec 01, 2024 at 05:30:20PM -0500, Tom Lane wrote: > Which certainly begs the question of how smart their re-ordering > algorithm is, or what they do about ambiguity between new and existing > objects. Perhaps because they are able to track efficiently all schema references, like checking the internal of functions at creation time rather than just at runtime? The ambiguity between new and existing objects may be tricky, indeed. If I'm parsing the spec right, the doc mentions in its 5)~6) of the syntax rules in CREATE SCHEMA that non-schema-qualified objects should use the new schema name defined in the CREATE SCHEMA query. So that pretty much settles the rules to use when having a new object that has a reference to a non-qualified object created in the same CREATE SCHEMA query? > But at any rate, it looks like everybody is at least trying > to do some amount of re-ordering, which makes me wonder what it is > that I'm missing in the spec. That's an awful lot of effort to be > expending on something that the spec doesn't seem to require. As Jian has mentioned, 9075-2-2023 around 11.1 for CREATE SCHEMA does not include any ordering assumptions when the elements are created, so my guess is that this is left up to each implementation depending on how they need to handle their dependencies with their meta-data lookup? The result would be the same once the query has finished running, as long as the elements created are consistent with their inner dependencies. -- Michael --pKAi9xf+sAyL0eBc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmdNDsEACgkQnvQgOdby QH0PIQ//VsSaqwCqxFFB0QnCvj8ZqR97ouI//TSpP0QvPktDAX2zQOqWb5IKGUT0 HO7aLup855m1qYpMjbi2809ztAf1NLUDGZ7+5lOzvXTZFZgUk6CsCwdTg88BxakE yvScvP+drn71Qdb7iDI8j0AWyinP5/maO4GZWxZsAU6KAs5iOtcPG3E+uV2GABVb uNVNy8TC8aFl0mpivINVbnkzcB9ow/+G/gNgE8YCYU0Y921ofD5bB+vY5UD9Iqa4 vZ/GKK65IA8GNBG2vcR6uJ8BDUbmEUeJ4dLEi/GT54JBgtkUK1bsuNR9Q9y05/9s 0di+tGHyECmOJAmFDG7tjSFp5Ux3Ln+bSzZq7j03DwT14648GmEQe8hUds2F+HpW eDm0e6fIBiA1rQHMWKVqQBR8HfQWvbQo39W7YpSUzGOHAz++XgGNGe80IigyiwWL JybzdT5BDu/ni4DGrpva+JnzgAjwAHa50Zvk+K1mdxBuybj8QARfLo7eIEmzznxQ RUO+0uyJIRkT2k79g0TSvXcKvE9vcf6vN6gR2vfy1JpK6AkVhZGQfB9gJ17zjXzu WjsI0fmGW0kfacvRneSri48RpQFkTj19x30SDNl36C2kve0d/Q9+PtXEapUBNT9q CoYtUwFJmgPeCVfR69GHzc6ZYh3z8kXUr/8o/3WOBWpKAjuahuU= =IJRZ -----END PGP SIGNATURE----- --pKAi9xf+sAyL0eBc--