Re: SQL/JSON features for v15

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>
Subject: Re: SQL/JSON features for v15
Date: 2022-08-23 16:06:22
Message-ID: CAFj8pRBqhLvTvf8_zHoM6Jc656atEWRUPnp6i_T5hjExeB83Ag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

út 23. 8. 2022 v 17:55 odesílatel Andres Freund <andres(at)anarazel(dot)de> napsal:

> Hi,
>
> On 2022-08-23 10:51:04 -0400, Robert Haas wrote:
> > I do not think that using subtransactions as part of the expression
> > evaluation process is a sound idea pretty much under any
> > circumstances. Maybe if the subtransations aren't commonly created and
> > don't usually get XIDs there wouldn't be a big problem in practice,
> > but it's an awfully heavyweight operation to be done inside expression
> > evaluation even in corner cases. I think that if we need to make
> > certain operations that would throw errors not throw errors, we need
> > to refactor interfaces until it's possible to return an error
> > indicator up to the appropriate level, not just let the error be
> > thrown and catch it.
>
> 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.
>

The errors that should be handled are related to json structure errors. I
don't think so we have to handle all errors and all conversions.

The JSON knows only three types - and these conversions can be written
specially for this case - or we can write json io routines to be able to
signal error
without an exception.

Regards

Pavel

>
> Greetings,
>
> Andres Freund
>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Önder Kalacı 2022-08-23 16:24:42 Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Previous Message Zhihong Yu 2022-08-23 15:56:59 Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)