From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Amit Langote <amitlangote09(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
Subject: | Re: SQL/JSON features for v15 |
Date: | 2022-09-30 03:05:07 |
Message-ID: | d29e076b-d7b8-9bb1-4eef-d4e22d7ff1c2@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022-09-01 Th 09:54, Nikita Glukhov wrote:
>
> On 31.08.2022 23:39, Nikita Glukhov wrote:
>
>> And here is a quick POC patch with an example for COPY and float4
> I decided to go further and use new API in SQL/JSON functions
> (even if it does not make real sense now).
>
> I have added function for checking expressions trees, special
> executor steps for handling errors in FuncExpr, CoerceViaIO,
> CoerceToDomain which are passed through ExprState.edata.
>
> Of course, there is still a lot of work:
> 1. JIT for new expression steps
> 2. Removal of subsidary ExprStates (needs another solution for
> ErrorData passing)
> 3. Checking of domain constraint expressions
> 4. Error handling in coercion to bytea
> 5. Error handling in json_populate_type()
> 6. Error handling in jsonb::type casts
> 7. ...
>
>
> Also I have added lazy creation of JSON_VALUE coercions, which was
> not present in previous patches. It really greatly speeds up JIT
> and reduces memory consumption. But it requires using of subsidary
> ExprStates.
>
>
> jsonb_sqljson test now fails because of points 4, 5, 6.
It looks like this needs to be rebased anyway.
I suggest just submitting the Input function stuff on its own, I think
that means not patches 3,4,15 at this stage. Maybe we would also need a
small test module to call the functions, or at least some of them.
The earlier we can get this in the earlier SQL/JSON patches based on it
can be considered.
A few comments:
. proissafe isn't really a very informative name. Safe for what? maybe
proerrorsafe or something would be better?
. I don't think we need the if test or else clause here:
+ if (edata)
+ return InputFunctionCallInternal(flinfo, str, typioparam,
typmod, edata);
+ else
+ return InputFunctionCall(flinfo, str, typioparam, typmod);
. I think we should probably cover float8 as well as float4, and there
might be some other odd gaps.
As mentioned previously, this should really go in a new thread, so
please don't reply to this but start a completely new thread.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Nathan Bossart | 2022-09-30 03:09:56 | Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes? |
Previous Message | Tom Lane | 2022-09-30 02:49:00 | Re: more descriptive message for process termination due to max_slot_wal_keep_size |