Re: POC: PLpgSQL FOREACH IN JSON ARRAY - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: POC: PLpgSQL FOREACH IN JSON ARRAY
Date
Msg-id CAFj8pRDom7DWYnOWUtSArW2D=WJ+JKpU=oNPgO7C=KUU_pEb-w@mail.gmail.com
Whole thread
In response to Re: POC: PLpgSQL FOREACH IN JSON ARRAY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: POC: PLpgSQL FOREACH IN JSON ARRAY
List pgsql-hackers
Hi

čt 12. 3. 2026 v 5:30 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
Peter Eisentraut <peter@eisentraut.org> writes:
> Maybe this could be written in such a way that it doesn't hardcode JSON
> arrays specifically, but a type could have an iteration helper function
> that would feed this feature?

+1.  ISTM that this feature would make sense for subscriptable types,
so one way to shoehorn it into the system without a lot of new overhead
could be to extend struct SubscriptRoutines to offer optional support
function(s) for iterating through all the elements of a subscriptable
object.

I'll try to write second patch in this way

Regards

Pavel
 

                        regards, tom lane

pgsql-hackers by date:

Previous
From: "Anders Åstrand"
Date:
Subject: Re: Change initdb default to the builtin collation provider
Next
From: Bertrand Drouvot
Date:
Subject: Re: Defend against -ffast-math in meson builds