2013/3/21 Brendan Jurd <dire...@gmail.com>: > On 21 March 2013 17:08, Pavel Stehule <pavel.steh...@gmail.com> wrote: >> 2013/3/21 Tom Lane <t...@sss.pgh.pa.us>: >>> I'm not entirely convinced that this is a good idea, but if we're going >>> to allow it I would argue that "array_length(a)" should be defined as >>> "array_length(a, 1)". The other possibilities are too complicated to >>> explain in as few words. >>> >> >> exactly >> >> +1 > > Hi Pavel, > > Is your +1 to array_length(a) being defined as array_length(a,1), or > to Tom's being unconvinced by the whole proposal? Or both?
If I though about it more, I like to more limit one parametric array_length function just for only 1D array. So it is your A use case. But I understand so this variant is not orthogonal. Hard to say, what is better. almost all operations are done on 1D arrays and for multidimensional arrays I don't have a problem with more verbosity (it is better there be more verbose). Probably a most clean solution is Tom's proposal (from API perspective) - with full ANSI/SQL SET implementation. So for 1D operations user can use SET instead 1D arrays. so Tom proposal is cleaner your @a proposal is safer any other opinions??? Regards Pavel > > Cheers, > BJ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers