[GSoC] array processing questions

Started by Charles Cuiover 7 years ago3 messages
#1Charles Cui
charles.cui1984@gmail.com

Hi mentors and hackers,

One question about array processing in postgresql. Assume my input is a
Datum (which contains an array). Are there any examples to loop through the
array and operates on each element? feel like it is not that straight-ford.

Thanks Charles

#2Andrew Gierth
andrew@tao11.riddles.org.uk
In reply to: Charles Cui (#1)
Re: [GSoC] array processing questions

"Charles" == Charles Cui <charles.cui1984@gmail.com> writes:

Charles> Hi mentors and hackers,
Charles> One question about array processing in postgresql. Assume
Charles> my input is a Datum (which contains an array). Are there any
Charles> examples to loop through the array and operates on each
Charles> element? feel like it is not that straight-ford.

See array_iter_setup and array_iter_next

--
Andrew (irc:RhodiumToad)

#3Charles Cui
charles.cui1984@gmail.com
In reply to: Andrew Gierth (#2)
Re: [GSoC] array processing questions

thanks Andrew, will take a look.

On Sat, Jun 23, 2018, 5:44 PM Andrew Gierth <andrew@tao11.riddles.org.uk>
wrote:

Show quoted text

"Charles" == Charles Cui <charles.cui1984@gmail.com> writes:

Charles> Hi mentors and hackers,
Charles> One question about array processing in postgresql. Assume
Charles> my input is a Datum (which contains an array). Are there any
Charles> examples to loop through the array and operates on each
Charles> element? feel like it is not that straight-ford.

See array_iter_setup and array_iter_next

--
Andrew (irc:RhodiumToad)