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

From Tom Lane
Subject Re: POC: PLpgSQL FOREACH IN JSON ARRAY
Date
Msg-id 4166.1773289811@sss.pgh.pa.us
Whole thread Raw
In response to Re: POC: PLpgSQL FOREACH IN JSON ARRAY  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: POC: PLpgSQL FOREACH IN JSON ARRAY
List pgsql-hackers
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.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: Re: Exit walsender before confirming remote flush in logical replication
Next
From: Xuneng Zhou
Date:
Subject: Re: Streamify more code paths