In C# we can do something like this:

public static void UseParams(params int[] list)
{
    for (int i = 0; i < list.Length; i++)
        Console.Write(list[i] + " ");
}

and call it like this: UseParams(1, 2, 3, 4);

Can we do the same in PostgreSQL (running the latest Version 9.6)?

create or replace function UseParams(list int[]) returns void as
share|improve this question
4  
Use variadic: postgresql.org/docs/current/static/… – a_horse_with_no_name Oct 5 '16 at 9:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.