Re: SQL/JSON revisited

Erik Rijkers <er@xs4all.nl>

From: Erik Rijkers <er@xs4all.nl>
To: Amit Langote <amitlangote09@gmail.com>, vignesh C <vignesh21@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Andrew Dunstan <andrew@dunslane.net>, e.indrupskaya@postgrespro.ru
Date: 2023-02-20T14:41:36Z
Lists: pgsql-hackers
Op 20-02-2023 om 08:35 schreef Amit Langote:
>>
> 
> Rebased again over queryjumble overhaul.
>

Hi,


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,

Erik Rijkers



PS
Log doesn't really have anything interesting:

2023-02-20 14:57:06.073 CET 1336 LOG:  server process (PID 1493) was 
terminated by signal 9: Killed
2023-02-20 14:57:06.073 CET 1336 DETAIL:  Failed process was running: 
select json_query(jsonb '[3,4]', '$[*]' returning bigint[] empty object 
on error);
2023-02-20 14:57:06.359 CET 1336 LOG:  terminating any other active 
server processes
2023-02-20 14:57:06.667 CET 1336 LOG:  all server processes terminated; 
reinitializing
2023-02-20 14:57:11.870 CET 1556 LOG:  database system was interrupted; 
last known up at 2023-02-20 14:44:43 CET



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.