Re: SQL:2023 JSON simplified accessor support - Mailing list pgsql-hackers

From Chao Li
Subject Re: SQL:2023 JSON simplified accessor support
Date
Msg-id 3EF2F248-1881-4764-96D7-CC0957AC68F7@gmail.com
Whole thread Raw
In response to Re: SQL:2023 JSON simplified accessor support  (Alexandra Wang <alexandra.wang.oss@gmail.com>)
List pgsql-hackers

Best,
Alex
<v14-0002-Allow-Generic-Type-Subscripting-to-Accept-Dot-No.patch><v14-0003-Export-jsonPathFromParseResult.patch><v14-0001-Allow-transformation-of-only-a-sublist-of-subscr.patch><v14-0005-Implement-read-only-dot-notation-for-jsonb.patch><v14-0007-Implement-jsonb-wildcard-member-accessor.patch><v14-0006-Implement-Jsonb-subscripting-with-slicing.patch><v14-0004-Extract-coerce_jsonpath_subscript.patch>

I am trying to split different topics to different email to keep every issue to be focused.

I also have a suggestion.

If I do:

```
— s1
select (t.data)['con']['a'][1]['b']['c']['d'] from test_jsonb_types t;

—s2
select (t.data).con.a[1].b['c'].d from test_jsonb_types t;
```

The two statements are actually identical. But they generate quite different rewritten query trees. S1’s rewritten tree is much simpler than s2’s. However, their plan trees are the same.

I think we can convert string indirections to indices indirection first before transform indirections, so that the two SQLs will generate the same rewritten query tree, which would simplify the code logic of rewriting query tree and the planner.


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




pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: [WIP]Vertical Clustered Index (columnar store extension) - take2
Next
From: Amit Kapila
Date:
Subject: Re: Avoid retaining conflict-related data when no tables are subscribed