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.96) (envelope-from ) id 1x2KyA-005iN1-22 for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Sep 2026 03:52:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x2Ky9-0043yQ-1z for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Sep 2026 03:52:01 +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.96) (envelope-from ) id 1x2Ky9-0043yF-10 for pgsql-hackers@lists.postgresql.org; Fri, 04 Sep 2026 03:52:01 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x2Ky7-00000002qDQ-0UG8 for pgsql-hackers@lists.postgresql.org; Fri, 04 Sep 2026 03:52:01 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2ceab75934dso5568935ad.2 for ; Thu, 03 Sep 2026 20:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1788493917; x=1789098717; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ENwuN9BZsLE2gvz0JK0aYAIBmLQpyQL5/z2KEUX5Bz4=; b=Es4j4hiDBGDUQnKPbbHJahjBdWKF0/UgG2ykhK2nbudn/5wqu2MxjAwJvE5S2X0Nn9 ebN4zXm1sOU6lSiwbTFTRThXgIvLxcg5VCsKRB1SF/8EkiDDRMZ8ZHOcpL73HjCyc6tI ptvqau+EQqR1QQj/6t0H4DeSnyKZcUbKYfp/Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788493917; x=1789098717; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=ENwuN9BZsLE2gvz0JK0aYAIBmLQpyQL5/z2KEUX5Bz4=; b=AZNFNSB0jRg0zb2o+IJ5zOXaJkd5kAUXKy9Gr/jwcKnCyQq6DSmDaW3m3+LxKnBSZe ArLS0EALA1cmwLypgNOIeppRDQ5hL9JIXJadDGKcAP1FPExjtfEzi2AlUW5yIOdvIKYZ V/xzJ4vQqzScS+N7piB4iJ9kqGKpD0o9GCRUb8Mj77RF3myHTo4Y8YhZ+gQHWFBe0SNK DGjm89Tu5UpXjaqlggokIMMJgpMifaZ7+yjut42HJdY+5hX3lKYCiFsJvQezNZ1omn5L /u1yOarI1S9JmP5rSxlUBeH7MZx3BSphgvitPC4jZzGmX6DhTBLQswXkPAHJI8wjqoqF 28IQ== X-Forwarded-Encrypted: i=1; AKwUvByOzRJdRjdFOodefquV9URpz1NtmtXCe4++qacQsTi1IDDfl0/tSdGaI38i7LKLL/OFpbRJplZmEyjzsnJJ@lists.postgresql.org X-Gm-Message-State: AFuF++lphHCpbzJ4+odk1boNwx/tbavleycNw9LKtU4/X/e6wjb1t3+g weSDimvIlqVGtA8uXMJPLDBzYg7udpF8VqV7rgQoC/efWfbhJbh/VynZZ+AFMVeYUQ== X-Gm-Gg: AYBFou1yR+5YcDo+BHSDJQEY8RUIXDYAXEUejQjrL9G5wVUPrheFndelciNOj5L9oGE NQ4tn/pgN2h5lNRv/bWs/vY1DORZMLy9Z+TYVoDAfRk9Y70ko2hivrV5pKBRBhf/+6xrfKz1RH4 sHaMQuWrZJV27AVffSIm1MqEjtsxhqAuxwv65z17a1S/pHEtrERFMnoo0C6YsN5l64kBWanMy/e /RHaAA1qtOPkGHPV35vBtKYBGiaqaTvWzAnzngcaLxoghVxN/o9J+W8k1X/+qYicBE0zyv90Cez qT8UFWWSWwn8xMUYt8XxjaLrXXbO1HfIT+X1EudXVW+GUKCzb51yV+fczYZ+rKp1TTy7JO00piZ o0WnQPUwS2M1iOQX7B/FyQOZQKd3kPEoXOsCvxzL6Sc0RtMH5qdWtEXKzkeqsRiOzCXJSCNReTD wYDMRJSjUgu4V6f37bcNPBzvCPKqm54c7piaq/1ciJ2a0F/iEdOaJwzK/fAzX1/z2SjYr/iXcnc DAl23UsIWcUuFcrZAEN X-Received: by 2002:a17:90b:52c4:b0:36a:5d1f:7b6 with SMTP id 98e67ed59e1d1-39b260d3375mr5132409a91.2.1788493917104; Thu, 03 Sep 2026 20:51:57 -0700 (PDT) Received: from microsoft.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3339a534df1sm3383590eec.7.2026.09.03.20.51.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Sep 2026 20:51:56 -0700 (PDT) Date: Thu, 3 Sep 2026 20:51:54 -0700 From: Noah Misch To: Tom Lane Cc: jian he , Kirill Reshke , Peter Eisentraut , PostgreSQL Hackers Subject: Re: CREATE SCHEMA ... CREATE DOMAIN support Message-ID: <20260904035154.0b.noahmisch@microsoft.com> References: <685422.1756848241@sss.pgh.pa.us> <3819788.1775241322@sss.pgh.pa.us> <841583.1775414546@sss.pgh.pa.us> <944307.1775420103@sss.pgh.pa.us> <1199006.1775444695@sss.pgh.pa.us> <1838711.1775503188@sss.pgh.pa.us> <20260904002924.a7.noahmisch@microsoft.com> <1504966.1788483626@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1504966.1788483626@sss.pgh.pa.us> User-Agent: Mutt/2.3.0 (2026-01-25) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Sep 03, 2026 at 09:00:26PM -0400, Tom Lane wrote: > Noah Misch writes: > > CREATE TABLE public.mytable (c int); > > CREATE SCHEMA myschema > > CREATE VIEW myview AS SELECT * FROM mytable > > CREATE TABLE mytable (c int); > > SET search_path = pg_catalog; > > \d+ myschema.myview > > RESET search_path; > > > In v18, myview binds to myschema.mytable. In v19, it binds to public.mytable. > > I think the above-described syntax rule about > > doesn't allow v19's interpretation. > > This is not about that, it is about a9c350d's specific intent "Don't > try to re-order the subcommands of CREATE SCHEMA". That is, we > rejected the idea of allowing forward references between CREATE SCHEMA > subcommands, therefore myview will not bind to a CREATE TABLE > subcommand that comes after it. Frankly, I don't care about arguments > that this is not what the spec says: I think this behavior is more > useful, more intelligible, and less bug-prone than the spec's > semantics. Moreover we were never going to be able to do what the spec > says, as discussed in the thread leading up to that commit. I'm not saying that I want the server to reorder the commands or that I know of a standard requiring reorder. I'm fine requiring the user to order things for us. The syntax rule I cited[1] appears to require my original example to have the same name resolution as this variant w/ more schema qualifications: CREATE TABLE public.mytable (c int); CREATE SCHEMA myschema CREATE VIEW myschema.myview AS SELECT * FROM myschema.mytable CREATE TABLE myschema.mytable (c int); SET search_path = pg_catalog; \d+ myschema.myview RESET search_path; That succeeds in v18 and fails in v19, which is fine. The problem is that my original example (with less schema qualification) succeeds in both versions with different meaning, and the v19 meaning is not standard-compliant. [1] "If the is contained in a , then the that is specified or implicit in the is implicit." > >> +### D2 — a `SET role` / `SET session_authorization` clause on a routine element is refused under `AUTHORIZATION`, naming a security-definer function that does not exist > > > I would not act on this. > > Hmm, that one seems like a genuine bug to me; why do you think it > shouldn't be acted on? It's genuine, but the combination involved is rare enough that I'd shelve it so long as we're not in a post-scarcity world. No objection if someone wants to pursue it.