public inbox for [email protected]
help / color / mirror / Atom feedFrom: Zsolt Parragi <[email protected]>
To: [email protected]
Subject: Re: SQL/JSON: JSON_TRANSFORM (SQL standard, subclause 6.44)
Date: Thu, 2 Jul 2026 17:18:23 -0500
Message-ID: <CAN4CZFOfvdPy4J2oLL-fMph_A3YO7prHKv3bFQYDgD_DYj2VQA@mail.gmail.com> (raw)
In-Reply-To: <CAFC+b6pz+Qh889V14x8wm1usjNtS419JuaJQ1g5xeuYtUsz5OQ@mail.gmail.com>
References: <CAFC+b6pQxA0-YV8B-8KFub_bix_wdhA+oHrv7S1rYb2tQjjPzg@mail.gmail.com>
<CAFC+b6pz+Qh889V14x8wm1usjNtS419JuaJQ1g5xeuYtUsz5OQ@mail.gmail.com>
> Thanks for looking into this, currently for this patch set, i am following
> SQL
> standard but I'd really like the community's view on the overall direction
> for JSON_TRANSFORM: should we follow the SQL standard strictly, aim for
> Oracle compatibility, or take a Postgres-native approach where they
> conflict? I'm happy to go whichever way there's consensus on.
I would prefer the approach of following the standard - it just means
I can't review it with standard compliance in mind, as I only have
access to the publicly available oracle documentation.
+ analyzed_jst_action->pathspec = coerced_path_spec;
+ jsexpr->action = analyzed_jst_action;
Shouldn't jsexpr->patch_spec also be set? This currently crashes:
CREATE TABLE t (id int, j jsonb);
CREATE INDEX ON t ((JSON_TRANSFORM(j, REMOVE '$.a'))); -- crash
Another thing I noticed is that deparse support is missing:
EXPLAIN (VERBOSE) SELECT JSON_TRANSFORM('{"a":1}'::jsonb, REMOVE '$.a');
Shouldn't the following statement work?
SELECT JSON_TRANSFORM('{"arr":[{"a":1}]}', REPLACE 'lax $.arr.a' = '9');
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: SQL/JSON: JSON_TRANSFORM (SQL standard, subclause 6.44)
In-Reply-To: <CAN4CZFOfvdPy4J2oLL-fMph_A3YO7prHKv3bFQYDgD_DYj2VQA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox