String Array as an input parameter in PostgreSQL

In this post, I demonstrate to pass string array as an input parameter in stored function of PostgreSQL.

We already used a different approach to pass multiple value as a one single input parameter like, comma separated, XML Parameter, Table Type.
You can also find one more type which is an array of PostgreSQL.

I have created one stored function to demonstrate the string array.
In below, stored function I have declared one input parameter as string array and using for..loop I am fetching record from this array and storing into one temporary table.

Now let’s call this function by passing a string array.

The result is:

PostgreSQL String Array

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz