2010/12/17 Tom Lane <t...@sss.pgh.pa.us>: > Pavel Stehule <pavel.steh...@gmail.com> writes: >> I am resending a redesigned proposal about special plpgsql statement >> that support iteration over an array. > > OK ... > >> == Iteration over multidimensional arrays == >> Its designed to reduce one dimension from source array. It can remove >> a slicing and simplify code: > > This seems like a really bad, confusing idea. I think it should throw > a type-mismatch error in this case. If there is any use-case for such a > thing, which I'm quite unconvinced of, it ought to use a separate syntax > rather than overloading the element-by-element syntax.
Without this feature any iteration over 2d and more dimensional array is not practical. If I have a 2D array, then I would to get a vector. Access to individual values can be to limiting, because I need a more cycles to get a complete vector. Usually I can use a array of row instead a 2d array, but still and in feature there is problem with iteration over row. So sometime is more practical to use a 2d array. Actually It raise a type mismatch error, when a user used a scalar variable and data is a vector (array) Pavel > > regards, tom lane > -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers