[GENERAL] How to send multiple parameters to a pl/pgsql function

2009-10-21 Thread Sgarbossa Domenico
I need to create a pl/pgsql function witch accept a list of parameters and evaluate them. I've tried this CREATE OR REPLACE FUNCTION get_first_valid (lista_elementi VARCHAR[]) RETURNS VARCHAR AS $$ DECLARE the_oneVARCHAR; BEGIN IF (ARRAY_UPPER(lista_elementi, 1) IS NOT

Re: [GENERAL] How to send multiple parameters to a pl/pgsql function

2009-10-21 Thread Pavel Stehule
I know that postgresql array implementation is not right complete and that if just one element of array is NULL the basics array function (array_dims, array_upper, etc.) returns NULL. I need to send a list of parameters (which could contain NULL values) and evaluate the parameters

Re: [GENERAL] How to send multiple parameters to a pl/pgsql function

2009-10-21 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: I know that postgresql array implementation is not right complete and that if just one element of array is NULL the basics array function (array_dims, array_upper, etc.) returns NULL. It's not true. Dimensions are stored independent to content.