Re: extend JSON_TABLE top level path expression - Mailing list pgsql-hackers

From solai v
Subject Re: extend JSON_TABLE top level path expression
Date
Msg-id CAF0whueGZAf5-mUP5byJAYWgSuuT6gPnfSoy1sb3tCzHiD86yg@mail.gmail.com
Whole thread
In response to Re: extend JSON_TABLE top level path expression  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
Hi Jian,

I reviewed and tested patch v2 .
Before applying the patch JSON_TABLE  accepted only literal top-level
patch string such as '$.a' and rejected equivalent path expression
such as '$'||.'a' with:
ERROR :only string constants are supported in JSON_TABLE path specification
After applying the patch ,JSON_TABLE correctly accepts path
expressions and returns the expected results.
I verified cases using string concatenation (e.g. '$' || '.a' and '$'
|| '.' || 'a'),,while existing behavior with literal path strings
remained unchanged.
I also confirmed that JSON_QUERY already accepts such patch
expressions,so the patch makes JSON_TABLE behavior more consistent
with other SQL/JSON functions.
The patch applied successfully  and tested queries behaved as expected.
Thanks for working on this improvement.

Regards
Solai



pgsql-hackers by date:

Previous
From: Ewan Young
Date:
Subject: Re: Make SPI_prepare argtypes argument const
Next
From: shveta malik
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication