SQL/JSON revisited
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Date: 2022-12-28T07:28:29Z
Lists: pgsql-hackers
Attachments
- v1-0007-JSON_TABLE.patch (application/octet-stream) patch v1-0007
- v1-0010-Claim-SQL-standard-compliance-for-SQL-JSON-featur.patch (application/octet-stream) patch v1-0010
- v1-0009-Documentation-for-SQL-JSON-features.patch (application/octet-stream) patch v1-0009
- v1-0008-PLAN-clauses-for-JSON_TABLE.patch (application/octet-stream) patch v1-0008
- v1-0006-RETURNING-clause-for-JSON-and-JSON_SCALAR.patch (application/octet-stream) patch v1-0006
- v1-0005-SQL-JSON-functions.patch (application/octet-stream) patch v1-0005
- v1-0004-SQL-JSON-query-functions.patch (application/octet-stream) patch v1-0004
- v1-0001-Common-SQL-JSON-clauses.patch (application/octet-stream) patch v1-0001
- v1-0003-IS-JSON-predicate.patch (application/octet-stream) patch v1-0003
- v1-0002-SQL-JSON-constructors.patch (application/octet-stream) patch v1-0002
Hi, Rebased the SQL/JSON patches over the latest HEAD. I've decided to keep the same division of code into individual commits as that mentioned in the revert commit 2f2b18bd3f, squashing fixup commits in that list into the appropriate feature commits. The main difference from the patches as they were committed into v15 is that JsonExpr evaluation no longer needs to use sub-transactions, thanks to the work done recently to handle type errors softly. I've made the new code pass an ErrorSaveContext into the type-conversion related functions as needed and also added an ExecEvalExprSafe() to evaluate sub-expressions of JsonExpr that might contain expressions that call type-conversion functions, such as CoerceViaIO contained in JsonCoercion nodes. ExecExprEvalSafe() is based on one of the patches that Nikita Glukhov had submitted in a previous discussion about redesigning SQL/JSON expression evaluation [1]. Though, I think that new interface will become unnecessary after I have finished rebasing my patches to remove subsidiary ExprStates of JsonExprState that we had also discussed back in [2]. Adding this to January CF. -- Thanks, Amit Langote EDB: http://www.enterprisedb.com [1] https://www.postgresql.org/message-id/c3b315b6-1e9f-6aa4-8708-daa19cf3f1a3%40postgrespro.ru [2] https://postgr.es/m/20220616233130.rparivafipt6doj3@alap3.anarazel.de
Commits
-
Add SQL/JSON query functions
- 6185c9737cf4 17.0 landed
-
Add soft error handling to some expression nodes
- aaaf9449ec6b 17.0 landed
-
Adjust populate_record_field() to handle errors softly
- 1edb3b491bee 17.0 landed
-
Refactor code used by jsonpath executor to fetch variables
- faa2b953ba3b 17.0 landed
-
Code review for recent SQL/JSON commits
- 71bfd1543f8b 16.0 landed
-
Fix inconsistencies and style issues in new SQL/JSON code
- 60966f56c3e4 16.0 landed
-
Don't install postmaster symlink anymore
- 37e267335068 16.0 cited
-
Revert SQL/JSON features
- 2f2b18bd3f55 16.0 cited
-
Doc: standardize markup a bit more.
- 47046763c3ed 13.0 cited