Re: array_length(anyarray)

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Marko Tiikkaja <marko(at)joh(dot)to>, PostGreSql hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: array_length(anyarray)
Date: 2013-12-19 08:05:29
Message-ID: CAFj8pRCsp=puLsWinM=+6SbqpRwydkgeSrOSU=Gi2MeGt+mxiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/12/19 David Fetter <david(at)fetter(dot)org>

> On Wed, Dec 18, 2013 at 09:27:54PM +0100, Marko Tiikkaja wrote:
> > Hi,
> >
> > Attached is a patch to add support for array_length(anyarray), which
> > only works for one-dimensional arrays, returns 0 for empty arrays
> > and complains if the array's lower bound isn't 1. In other words,
> > does the right thing when used with the arrays people use 99% of the
> > time.
>
> +1 for adding this.
>

+1

length should be irrelevant to fact so array starts from 1, 0 or anything
else

Regards

Pavel

>
> Cheers,
> David.
> --
> David Fetter <david(at)fetter(dot)org> http://fetter.org/
> Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
> Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
> iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-12-19 08:44:07 Re: GIN improvements part 1: additional information
Previous Message David Fetter 2013-12-19 08:02:02 Re: array_length(anyarray)