Re: sql/json remaining issue
От | Amit Langote |
---|---|
Тема | Re: sql/json remaining issue |
Дата | |
Msg-id | CA+HiwqGNsDAo2NM+JMsP35sCP3EK4U=Ov11HvzE16SvAVtRF+Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: sql/json remaining issue (Amit Langote <amitlangote09@gmail.com>) |
Ответы |
Re: sql/json remaining issue
|
Список | pgsql-hackers |
On Tue, Apr 9, 2024 at 8:37 PM Amit Langote <amitlangote09@gmail.com> wrote: > On Tue, Apr 9, 2024 at 4:47 PM jian he <jian.universality@gmail.com> wrote: > > the last query error message is: > > ` > > ERROR: no SQL/JSON item > > ` > > > > we are in ExecEvalJsonExprPath, can we output it to be: > > ` > > ERROR: after applying json_path "5s", no SQL/JSON item found > > ` > > in a json_table query, we can have multiple path_expressions, like the > > above query. > > it's not easy to know applying which path_expression failed. > > Hmm, I'm not so sure about mentioning the details of the path because > path names are optional and printing path expression itself is not a > good idea. Perhaps, we could mention the column name which would > always be there, but we'd then need to add a new field column_name > that's optionally set to JsonFuncExpr and JsonExpr, that is, when they > are being set up for JSON_TABLE() columns. As shown in the attached. > With the patch you'll get: > > ERROR: no SQL/JSON item found for column "b" Attached is a bit more polished version of that, which also addresses the error messages in JsonPathQuery() and JsonPathValue(). I noticed that there was comment I had written at one point during JSON_TABLE() hacking that said that we should be doing this. I've also added an open item for this. -- Thanks, Amit Langote
Вложения
В списке pgsql-hackers по дате отправления: