Daniel Lundin <daniel@helena-daniel.se> writes:
> I'm trying to convert rows from a table into a two dimensional array, and
> thought I could do so in a plpgsql function, but I can't declare the return
> variable as an array:
The declaration is fine (at least it works for me, in 7.2). The trouble
is with:
> text[array_dim(text) + 1][0] := rs.src;
> text[array_dim(text) + 1][1] := rs.id;
plpgsql doesn't support assigning to array elements :-(. (Even if it
did, you couldn't use array_dims() like that --- array_dims() returns
a string.)
regards, tom lane