-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/5214~1
head repository: postgresql-cfbot/postgresql
compare: cf/5214
- 8 commits
- 23 files changed
- 4 contributors
Commits on Jul 11, 2025
-
Allow transformation of only a sublist of subscripts
This is a preparation step for allowing subscripting containers to transform only a prefix of an indirection list and modify the list in-place by removing the processed elements. Currently, all elements are consumed, and the list is set to NIL after transformation. In the following commit, subscripting containers will gain the flexibility to stop transformation when encountering an unsupported indirection and return the remaining indirections to the caller. Reviewed-by: Alexandra Wang <[email protected]> Reviewed-by: Andrew Dunstan <[email protected]> Reviewed-by: Matheus Alcantara <[email protected]> Reviewed-by: Jian He <[email protected]>
Nikita Glukhov authored and Commitfest Bot committedJul 11, 2025 Configuration menu - View commit details
-
Copy full SHA for 59fd3de - Browse repository at this point
Copy the full SHA 59fd3deView commit details -
Allow Generic Type Subscripting to Accept Dot Notation (.) as Input
This change extends generic type subscripting to recognize dot notation (.) in addition to bracket notation ([]). While this does not yet provide full support for dot notation, it enables subscripting containers to process it in the future. For now, container-specific transform functions only handle subscripting indices and stop processing when encountering dot notation. It is up to individual containers to decide how to transform dot notation in subsequent updates. Authored-by: Nikita Glukhov <[email protected]> Reviewed-by: Alexandra Wang <[email protected]> Reviewed-by: Andrew Dunstan <[email protected]> Reviewed-by: Matheus Alcantara <[email protected]> Reviewed-by: Jian He <[email protected]>
Nikita Glukhov authored and Commitfest Bot committedJul 11, 2025 Configuration menu - View commit details
-
Copy full SHA for 95243d0 - Browse repository at this point
Copy the full SHA 95243d0View commit details -
Export jsonPathFromParseResult()
This is a preparation step for a future commit that will reuse the aforementioned function. Authored-by: Nikita Glukhov <[email protected]> Reviewed-by: Alexandra Wang <[email protected]> Reviewed-by: Andrew Dunstan <[email protected]> Reviewed-by: Matheus Alcantara <[email protected]> Reviewed-by: Jian He <[email protected]>
Nikita Glukhov authored and Commitfest Bot committedJul 11, 2025 Configuration menu - View commit details
-
Copy full SHA for 85e5237 - Browse repository at this point
Copy the full SHA 85e5237View commit details -
Extract coerce_jsonpath_subscript()
This is a preparation step for a future commit that will reuse the aforementioned function. Co-authored-by: Nikita Glukhov <[email protected]> Co-authored-by: Alexandra Wang <[email protected]> Reviewed-by: Andrew Dunstan <[email protected]> Reviewed-by: Matheus Alcantara <[email protected]> Reviewed-by: Jian He <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 36aa8d9 - Browse repository at this point
Copy the full SHA 36aa8d9View commit details -
Implement read-only dot notation for jsonb
This patch introduces JSONB member access using dot notation that aligns with the JSON simplified accessor specified in SQL:2023. Examples: -- Setup create table t(x int, y jsonb); insert into t select 1, '{"a": 1, "b": 42}'::jsonb; insert into t select 1, '{"a": 2, "b": {"c": 42}}'::jsonb; insert into t select 1, '{"a": 3, "b": {"c": "42"}, "d":[11, 12]}'::jsonb; -- Existing syntax in PostgreSQL that predates the SQL standard: select (t.y)->'b' from t; select (t.y)->'b'->'c' from t; select (t.y)->'d'->0 from t; -- JSON simplified accessor specified by the SQL standard: select (t.y).b from t; select (t.y).b.c from t; select (t.y).d[0] from t; The SQL standard states that simplified access is equivalent to: JSON_QUERY (VEP, 'lax $.JC' WITH CONDITIONAL ARRAY WRAPPER NULL ON EMPTY NULL ON ERROR) where: VEP = <value expression primary> JC = <JSON simplified accessor op chain> For example, the JSON_QUERY equivalents of the above queries are: select json_query(y, 'lax $.b' WITH CONDITIONAL ARRAY WRAPPER NULL ON EMPTY NULL ON ERROR) from t; select json_query(y, 'lax $.b.c' WITH CONDITIONAL ARRAY WRAPPER NULL ON EMPTY NULL ON ERROR) from t; select json_query(y, 'lax $.d[0]' WITH CONDITIONAL ARRAY WRAPPER NULL ON EMPTY NULL ON ERROR) from t; Implementation details: Extends the existing container subscripting interface to support container-specific information, specifically a JSONPath expression for jsonb. During query transformation, if dot-notation is present, constructs a JSONPath expression representing the access chain. During execution, if a JSONPath expression is present in JsonbSubWorkspace, executes it via JsonPathQuery(). Does not transform accessors directly into JSON_QUERY during transformation to preserve the original query structure for EXPLAIN and CREATE VIEW. Co-authored-by: Nikita Glukhov <[email protected]> Co-authored-by: Alexandra Wang <[email protected]> Reviewed-by: Andrew Dunstan <[email protected]> Reviewed-by: Matheus Alcantara <[email protected]> Reviewed-by: Mark Dilger <[email protected]> Reviewed-by: Jian He <[email protected]> Reviewed-by: Vik Fearing <[email protected]> Reviewed-by: Nikita Malakhov <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Tested-by: Jelte Fennema-Nio <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c043f26 - Browse repository at this point
Copy the full SHA c043f26View commit details -
Implement Jsonb subscripting with slicing
Previously, slicing was not supported for jsonb subscripting. This commit implements subscripting with slicing as part of the JSON simplified accessor syntax specified in SQL:2023. Co-authored-by: Nikita Glukhov <[email protected]> Co-authored-by: Alexandra Wang <[email protected]> Reviewed-by: Andrew Dunstan <[email protected]> Reviewed-by: Matheus Alcantara <[email protected]> Reviewed-by: Mark Dilger <[email protected]> Reviewed-by: Jian He <[email protected]> Reviewed-by: Vik Fearing <[email protected]> Reviewed-by: Nikita Malakhov <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Tested-by: Mark Dilger <[email protected]> Tested-by: Jian He <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c876f74 - Browse repository at this point
Copy the full SHA c876f74View commit details -
Implement jsonb wildcard member accessor
This commit adds support for wildcard member access in jsonb, as specified by the JSON simplified accessor syntax in SQL:2023. Co-authored-by: Nikita Glukhov <[email protected]> Co-authored-by: Alexandra Wang <[email protected]> Reviewed-by: Andrew Dunstan <[email protected]> Reviewed-by: Matheus Alcantara <[email protected]> Reviewed-by: Mark Dilger <[email protected]> Reviewed-by: Jian He <[email protected]> Reviewed-by: Vik Fearing <[email protected]> Reviewed-by: Nikita Malakhov <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Reviewed-by: Jelte Fennema-Nio <[email protected]> Tested-by: Jelte Fennema-Nio <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 192baab - Browse repository at this point
Copy the full SHA 192baabView commit details -
[CF 5214] v12 - SQL:2023 JSON simplified accessor support
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5214 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CAK98qZ0whQ=c+JGXbGSEBxCtLgy6sf-YGYqsKTAGsS-wt0wj+A@mail.gmail.com Author(s): Alexandra Wang
Commitfest Bot committedJul 11, 2025 Configuration menu - View commit details
-
Copy full SHA for 5d0a5df - Browse repository at this point
Copy the full SHA 5d0a5dfView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/5214~1...cf/5214