Re: SQL/JSON revisited

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Erik Rijkers <er@xs4all.nl>
Cc: vignesh C <vignesh21@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Andrew Dunstan <andrew@dunslane.net>, e.indrupskaya@postgrespro.ru
Date: 2023-02-21T03:09:15Z
Lists: pgsql-hackers

Attachments

On Mon, Feb 20, 2023 at 11:41 PM Erik Rijkers <er@xs4all.nl> wrote:
> Op 20-02-2023 om 08:35 schreef Amit Langote:
> > Rebased again over queryjumble overhaul.
> But the following statement is a problem. It does not crash but it goes
> off, half-freezing the machine, and only comes back after fanatic
> Ctrl-C'ing.
>
> select json_query(jsonb '[3,4]', '$[*]' returning bigint[] empty object
> on error);
>
> Can you have a look?

Thanks for the test case.  It caused ExecInterpExpr() to enter an
infinite loop, which I've fixed in the attached updated version.  I've
also merged Elena's documentation changes; I can see that
<replaceable> is more correct.

Now looking at Andres' comments, though, posting a version containing
a fix for the above case so Erik may continue the testing in the
meantime.

-- 
Thanks, Amit Langote
EDB: http://www.enterprisedb.com

Commits

  1. Add SQL/JSON query functions

  2. Add soft error handling to some expression nodes

  3. Adjust populate_record_field() to handle errors softly

  4. Refactor code used by jsonpath executor to fetch variables

  5. Code review for recent SQL/JSON commits

  6. Fix inconsistencies and style issues in new SQL/JSON code

  7. Don't install postmaster symlink anymore

  8. Revert SQL/JSON features

  9. Doc: standardize markup a bit more.