Thread: array size problem

array size problem

From
"Luis Silva"
Date:
I there!! i'm having a problem
 
I want to make a function in pl/pgsql with 1 argument, a char[] (ex. identities). Is it possible to get the size of the array
 
example:
i=0;
WHILE i < identities.size LOOP
 
    sql.........
    i++;
END LOOP;
 
thanks in advance

Re: array size problem

From
John DeSoi
Date:
On Jan 1, 2006, at 5:17 PM, Luis Silva wrote:

> I want to make a function in pl/pgsql with 1 argument, a char[]
> (ex. identities). Is it possible to get the size of the array


array_upper (anyarray, 1)

See http://www.postgresql.org/docs/8.1/interactive/functions-array.html




John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL