Re: pgsql: Add more SQL/JSON constructor functions - Mailing list pgsql-hackers

From Amit Langote
Subject Re: pgsql: Add more SQL/JSON constructor functions
Date
Msg-id CA+HiwqHVgMfo0QFc9dQr-VOro_TqaOg9mGxXJTPnTVuRGuXCpA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add more SQL/JSON constructor functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Add more SQL/JSON constructor functions
List pgsql-hackers
On Tue, Jun 4, 2024 at 2:20 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Eisentraut <peter@eisentraut.org> writes:
> > On 02.06.24 21:46, Tom Lane wrote:
> >> If you don't
> >> like our current behavior, then either you have to say that RETURNING
> >> with a length-limited target type is illegal (which is problematic
> >> for the spec, since they have no such type) or that the cast behaves
> >> like an implicit cast, with errors for overlength input (which I find
> >> to be an unintuitive definition for a construct that names the target
> >> type explicitly).
>
> > It asks for the latter behavior, essentially (but it's not defined in
> > terms of casts).  It says:
>
> Meh.  Who needs consistency?  But I guess the answer is to do what was
> suggested earlier and change the code to use COERCE_IMPLICIT_CAST.

OK, will post a patch to do so in a new thread on -hackers.

--
Thanks, Amit Langote



pgsql-hackers by date:

Previous
From: "Long Song"
Date:
Subject: Re:Re: [PATCH]A minor improvement to the error-report in SimpleLruWriteAll()
Next
From: Tender Wang
Date:
Subject: Re: Should consider materializing the cheapest inner path in consider_parallel_nestloop()