Re: SQL/JSON features for v15
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: "Jonathan S. Katz" <jkatz@postgresql.org>,
Nikita Glukhov <n.gluhov@postgrespro.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Andrew Dunstan <andrew@dunslane.net>, Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael@paquier.xyz>, John Naylor <john.naylor@enterprisedb.com>,
Amit Langote <amitlangote09@gmail.com>
Date: 2022-08-23T16:26:55Z
Lists: pgsql-hackers
On Tue, Aug 23, 2022 at 11:55 AM Andres Freund <andres@anarazel.de> wrote: > I don't think that's quite realistic - that's the input/output functions for > all types, basically. I'd be somewhat content if we'd a small list of very > common coercion paths we knew wouldn't error out, leaving things like OOM > aside. Even just knowing that for ->text conversions would be a huge deal in > the context of this patch. One problem here is that the whole type coercion > infrastructure doesn't make it easy to know what "happened inside" atm, one > has to reconstruct it from the emitted expressions, where there can be > multiple layers of things to poke through. 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. What you (probably) want is to know whether one specific error happened or not, and catch only that one. And the error machinery isn't designed for that. It's not designed to let you catch specific errors for specific call sites, and it's also not designed to be particularly efficient if lots of errors need to be caught over and over again. If you decide to ignore all that and do it anyway, you'll end up with, at best, code that is complicated, hard to maintain, and probably slow when a lot of errors are trapped, and at worst, code that is fragile or outright buggy. -- Robert Haas EDB: http://www.enterprisedb.com
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