Re: SQL/JSON features for v15
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>,
"Jonathan S. Katz" <jkatz@postgresql.org>,
Nikita Glukhov <n.gluhov@postgrespro.ru>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Andrew Dunstan <andrew@dunslane.net>,
Michael Paquier <michael@paquier.xyz>,
John Naylor <john.naylor@enterprisedb.com>,
Amit Langote <amitlangote09@gmail.com>
Date: 2022-08-23T17:28:50Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > On 2022-08-23 12:26:55 -0400, Robert Haas wrote: >> But that's exactly what I'm complaining about. Catching an error that >> unwound a bunch of stack frames where complicated things are happening >> is fraught with peril. There's probably a bunch of errors that could >> be thrown from somewhere in that code - out of memory being a great >> example - that should not be caught. > The code as is handles this to some degree. Only ERRCODE_DATA_EXCEPTION, > ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION are caught, the rest is immediately > rethrown. That's still a lot of territory, considering how nonspecific most SQLSTATEs are. Even if you can prove that only the intended cases are caught today, somebody could inadvertently break it next week by using one of those codes somewhere else. I agree with the upthread comments that we only need/want to catch foreseeable incorrect-input errors, and that the way to make that happen is to refactor the related type input functions, and that a lot of the heavy lifting for that has been done already. regards, tom lane
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