Re: SQL/JSON features for v15
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: "Jonathan S. Katz" <jkatz@postgresql.org>,
Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Andrew Dunstan <andrew@dunslane.net>, Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael@paquier.xyz>, John Naylor <john.naylor@enterprisedb.com>
Date: 2022-08-23T08:21:59Z
Lists: pgsql-hackers
On Tue, Aug 23, 2022 at 4:48 PM Amit Langote <amitlangote09@gmail.com> wrote: > On Thu, Aug 18, 2022 at 12:46 PM Nikita Glukhov <n.gluhov@postgrespro.ru> wrote: > > The desciprion of the v7 patches: > > > > 0003 Add EEOP_SUBTRANS executor step > > v6 + new recursive JIT > > > > 0004 Split JsonExpr execution into steps > > simply rebase of v6 + used LLMBuildSwitch() in EEOP_JSONEXPR > > Will need to spend more time looking at these. 0004 adds the following to initJsonItemCoercions(): + /* When returning JSON types, no need to initialize coercions */ + /* XXX domain types on json/jsonb */ + if (returning->typid == JSONBOID || returning->typid == JSONOID) + return NULL; But maybe it's dead code, because 0001 has this: + if (jsexpr->returning->typid != JSONOID && + jsexpr->returning->typid != JSONBOID) + jsexpr->coercions = + initJsonItemCoercions(pstate, jsexpr->returning, + exprType(contextItemExpr)); + /* We need to handle RETURNING int etc. */ Is this a TODO and what does it mean? + * "JsonCoercion == NULL" means no cast is available. + * "JsonCoercion.expr == NULL" means no coercion is needed. As said in my previous email, I wonder if these cases are better handled by adding JSON_COERCION_ERROR and JSON_COERCION_NONE coercions? +/* Skip calling ExecEvalJson() on a JsonExpr? */ ExecEvalJsonExpr() Will look more. -- Thanks, Amit Langote EDB: http://www.enterprisedb.com
Commits
-
JSON_TABLE: Add support for NESTED paths and columns
- bb766cde63b4 17.0 landed
-
Add basic JSON_TABLE() functionality
- de3600452b61 17.0 landed
-
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
-
Add more SQL/JSON constructor functions
- 03734a7fed7d 17.0 landed
-
SQL/JSON: support the IS JSON predicate
- 6ee30209a6f1 16.0 landed
-
SQL/JSON: add standard JSON constructor functions
- 7081ac46ace8 16.0 landed
-
Revert SQL/JSON features
- 96ef3237bf74 15.0 landed
- 2f2b18bd3f55 16.0 landed
-
Numeric error suppression in jsonpath
- 16d489b0fe05 12.0 cited