Re: SQL/JSON features for v15
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Nikita Glukhov <n.gluhov@postgrespro.ru>,
Amit Langote <amitlangote09@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: "Jonathan S. Katz" <jkatz@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>,
Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Michael Paquier <michael@paquier.xyz>,
John Naylor <john.naylor@enterprisedb.com>
Date: 2022-08-31T15:59:38Z
Lists: pgsql-hackers
On 2022-08-30 Tu 17:25, Nikita Glukhov wrote: > > > >>>> Patches 0001-0006: >>>> >>>> Yeah, these add the overhead of an extra function call (typin() -> >>>> typin_opt_error()) in possibly very common paths. Other than >>>> refactoring *all* places that call typin() to use the new API, the >>>> only other option seems to be to leave the typin() functions alone and >>>> duplicate their code in typin_opt_error() versions for all the types >>>> that this patch cares about. Though maybe, that's not necessarily a >>>> better compromise than accepting the extra function call overhead. >>> I think another possibility is to create a static inline function in the >>> corresponding .c module (say boolin_impl() in bool.c), which is called >>> by both the opt_error variant as well as the regular one. This would >>> avoid the duplicate code as well as the added function-call overhead. >> +1 > I always thought about such internal inline functions, I 've added them in v10. > > A couple of questions about these: 1. Patch 5 changes the API of DecodeDateTime() and DecodeTimeOnly() by adding an extra parameter bool *error. Would it be better to provide _opt_error flavors of these? 2. Patch 6 changes jsonb_from_cstring so that it's no longer static inline. Shouldn't we have a static inline function that can be called from inside jsonb.c and is called by the extern function? changing both of these things would be quite trivial and should not hold anything up. cheers andrew -- Andrew Dunstan EDB: https://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