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 1utJYg-004jCF-8p for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Sep 2025 05:27:55 +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 1utJYf-002Cxv-CS for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Sep 2025 05:27:53 +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 1utJYf-002Cxg-25 for pgsql-hackers@lists.postgresql.org; Tue, 02 Sep 2025 05:27:53 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1utJYb-0007Yh-0w for pgsql-hackers@postgresql.org; Tue, 02 Sep 2025 05:27:52 +0000 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-32326e20aadso5452729a91.2 for ; Mon, 01 Sep 2025 22:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756790868; x=1757395668; darn=postgresql.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=ZvS1AIt5FUIo5d5DQKKUP5leNMQJo2qYbYuTFUVELBI=; b=mKqX5q5rxKoaAFHlRsppJdWS8l6lwpwXJzcMuz+oMhh8QIyb4ILrrxwEvdmC8Ey/zB XAPYKjvv7i17m0N0jxDdXYiLES2RNGcxQoBZd/JBDxmjFoM1DviMXdvxIy1s7Qpznnjc 45MxpcdtQQHmgJcB1izDOxyIW7rmdLmbNMOKgPXuTsvOkDUZkHPSTuGsjju0cYcYXysG +YFezOPa4Km+sxL65HN3tyaWZV0RNrCz1vhxaRps74zibiRjBfzAt14C6LNxC72KPz0J 8LEXG7QA9cA9N38KMImRlK+jX0ij7xCalfdT+1nAXqsC2SZQv0EbWqXZ3RYFgiE3wQpN 9aQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756790868; x=1757395668; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZvS1AIt5FUIo5d5DQKKUP5leNMQJo2qYbYuTFUVELBI=; b=KmAC7iufihihUksXjQq72VUFl4bJjiRfzYh4Ko1O6VvLPp+K8rXdks+trOb2+ffxtR /YmdXDPMWS/XN5ssbg4/Uk4xtzLt3yNIHxbHJUYPdoaETDx9FhjEa0/ut6QW9eUQycgH 3TR0LSpOpmGpFQszSbU9+Yj53VO51P+xAwON+8jGl3FnWXjcwUK+kaJVNvsEJji2xumP dJOrH/vc3QTWj1Pe1rR62zF/BQU/rTSHtZtcmc244NUUZKc738kse9buk2rXzke6sZg3 3c07OB37gv5zYZ6V1NT+mKisIEWJvxcM5Gr5AeRgiJkI4vrjde0pJ/76V6qlhnykqaxL gxfQ== X-Forwarded-Encrypted: i=1; AJvYcCVat6TB196nafR+YLF3gFbJ2ZQhsU5MBKa5mYriS8o+zCX9PSF7KUepWTrXNu932IZ4XgxCQ+eCSq4CEc3q@postgresql.org X-Gm-Message-State: AOJu0YwaC42XDRxJgGeEtVOlz9OIjk/trpp0OcPZiaFsm5rwaBo7iAKa UxTqWmBtWaUOe+PFfvsly5jvljksA35s2PaA+GedFipQoL8CAfpx84UB X-Gm-Gg: ASbGnctGf6coaZTHk2MEwyU32/RwKkZEZhIojNKpOUNxKBZTLxBplJrjtt9nlmGAnfI cMgjrSCE5Ve2iTW+E3Yku+9x6i+cErrONZZuPnyfxVndkuNByzgETQ5bo52RgoRHcBfVFUMIwxW nTo9pGCG4O5C98VgtxYDxNKXOLFSg50yrmjzpWw2NFA2e0FEmAny+DdOF0FYkLVk9FuRRzD/uuw x4ibJNMSt1/ljDQH+0/ebTLmZIW72qhn6hl7QK9LNB7Y4Fx7syAK2b7JCmTAIQ2cLUQr/IhoHQT 2ZP9PVTTG3u5eBq3fVyGH2L3HuIwn5Hrg9HWKOuNhkRY7CzEDLmDSz4QwdaIcQxAx73j2IrSM9c o+NvijZ+u7jkXgBDgUGS5Mml/5SdvJSwvx1i9g8XyO8k= X-Google-Smtp-Source: AGHT+IEJN2Bc8MeiHwLUH0LovEfx6XGpiB6F82SemV6N1G0fHTSEG+sscnBPGYJaBZJvjHlXxLpGRw== X-Received: by 2002:a17:90b:1dcc:b0:31e:7410:a4d7 with SMTP id 98e67ed59e1d1-328156e473cmr14237373a91.33.1756790868223; Mon, 01 Sep 2025 22:27:48 -0700 (PDT) Received: from smtpclient.apple ([142.171.105.12]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7723427c127sm10967854b3a.62.2025.09.01.22.27.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Sep 2025 22:27:47 -0700 (PDT) From: Chao Li Message-Id: <3AB5E620-D210-4061-A5F0-F0B453CF3F4D@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_D6829CDB-DF67-42C0-83C8-960E11F7E9D0" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: SQL:2023 JSON simplified accessor support Date: Tue, 2 Sep 2025 13:27:29 +0800 In-Reply-To: Cc: Alexandra Wang , Nikita Glukhov , jian he , Nikita Malakhov , Vik Fearing , Mark Dilger , Matheus Alcantara , Peter Eisentraut , Andrew Dunstan , PostgreSQL Hackers , "David E. Wheeler" To: "David G. Johnston" References: <21fa36b4-6d56-4556-b524-9e3955b922c8@eisentraut.org> <290418A2-3A9B-4304-AAAD-4A40CFF1CB93@gmail.com> <98C6F445-773B-4C82-8198-7F5CD56D5252@gmail.com> X-Mailer: Apple Mail (2.3826.700.81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_D6829CDB-DF67-42C0-83C8-960E11F7E9D0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 2, 2025, at 11:53, David G. Johnston = wrote: >=20 > On Monday, September 1, 2025, Chao Li > wrote: >>=20 >> The last comment is about error message: >>=20 >> ``` >> evantest=3D# select data.a from test_jsonb_types; >> ERROR: missing FROM-clause entry for table "data" >> LINE 1: select data.a from test_jsonb_types; >> ``` >>=20 >> =E2=80=9CMissing FROM-clause entry=E2=80=9D is quite confusing and = not providing much useful hint to resolve the problem. When I first saw = this error, I was stuck. Only after read through the commit comments, I = figured out the problem. For end users, we should provide some more = meaningful error messages. >>=20 >=20 > I don=E2=80=99t think it=E2=80=99s fair to blame this patch set for = this. If you want to reference a component of a composite column you = need to write ([tbl.]col).field otherwise the parser gets confused = because it wants the thing prior to =E2=80=9Cfield=E2=80=9D to be a = table name if you don=E2=80=99t use the parentheses. This comes up all = the time if one uses composite typed columns. I=E2=80=99ll agree this = isn=E2=80=99t the greatest error message but I=E2=80=99d suggest = starting a new thread if you want to see about improving it. >=20 > David J. >=20 Sure, we can discuss the topic separately. -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/ --Apple-Mail=_D6829CDB-DF67-42C0-83C8-960E11F7E9D0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Sep 2, 2025, at 11:53, David G. Johnston = <david.g.johnston@gmail.com> wrote:

On Monday, September 1, 2025, = Chao Li <li.evan.chao@gmail.com> = wrote:

The last comment is = about error = message:

```
evantest=3D# select = data.a from test_jsonb_types;
ERROR:  missing FROM-clause = entry for table "data"
LINE 1: select data.a from = test_jsonb_types;
```

=E2=80=9CMi= ssing FROM-clause entry=E2=80=9D is quite confusing and not providing = much useful hint to resolve the problem. When I first saw this error, I = was stuck. Only after read through the commit comments, I figured out = the problem. For end users, we should provide some more meaningful error = messages.


I = don=E2=80=99t think it=E2=80=99s fair to blame this patch set for = this.  If you want to reference a component of a composite column = you need to write ([tbl.]col).field otherwise the parser gets confused = because it wants the thing prior to =E2=80=9Cfield=E2=80=9D to be a = table name if you don=E2=80=99t use the parentheses.  This comes up = all the time if one uses composite typed columns.  I=E2=80=99ll = agree this isn=E2=80=99t the greatest error message but I=E2=80=99d = suggest starting a new thread if you want to see about improving = it.

David J.


Sure, we can discuss the = topic separately.

--
Chao Li (Evan)
HighGo Software = Co., Ltd.
https://www.highgo.com/




= --Apple-Mail=_D6829CDB-DF67-42C0-83C8-960E11F7E9D0--