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 1tHsTT-00ATFy-Of for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Dec 2024 22:31:31 +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 1tHsSR-00BaYs-6P for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Dec 2024 22:30:28 +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 1tHsSQ-00BaYj-Sm for pgsql-hackers@lists.postgresql.org; Sun, 01 Dec 2024 22:30:28 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tHsSO-000YLR-5U for pgsql-hackers@lists.postgresql.org; Sun, 01 Dec 2024 22:30:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4B1MUKLP1488328; Sun, 1 Dec 2024 17:30:20 -0500 From: Tom Lane To: jian he cc: Kirill Reshke , Peter Eisentraut , PostgreSQL Hackers Subject: Re: CREATE SCHEMA ... CREATE DOMAIN support In-reply-to: <1353043.1733072243@sss.pgh.pa.us> References: <1898722.1732732780@sss.pgh.pa.us> <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> Comments: In-reply-to Tom Lane message dated "Sun, 01 Dec 2024 11:57:23 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1488326.1733092220.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 01 Dec 2024 17:30:20 -0500 Message-ID: <1488327.1733092220@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > I looked at DB2's reference page: > https://www.ibm.com/docs/en/db2/11.5?topic=3Dstatements-create-schema Oh, how did I forget Oracle? https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/CREATE= -SCHEMA.html Theirs is restricted to CREATE TABLE, CREATE VIEW, and GRANT; also this curious restriction: "The CREATE SCHEMA statement supports the syntax of these statements only as defined by standard SQL, rather than the complete syntax supported by Oracle Database." But then they say: "The order in which you list the CREATE TABLE, CREATE VIEW, and GRANT statements is unimportant. The statements within a CREATE SCHEMA statement can reference existing objects or objects you create in other statements within the same CREATE SCHEMA statement." Which certainly begs the question of how smart their re-ordering algorithm is, or what they do about ambiguity between new and existing objects. 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. regards, tom lane