Re: Arrays: determining size

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: SZUCS Gábor <surrano(at)mailbox(dot)hu>, pgsql-general(at)postgresql(dot)org
Subject: Re: Arrays: determining size
Date: 2002-12-03 16:36:10
Message-ID: 20021203163610.26977103C2@polaris.pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks - those will be useful but I can make do for now with array_dims. My
next curiosity (I'll be posting soon when I get a good example) is how
Postgresql deals with elements off the end of the array. Stay tuned :)

-Steve

On Monday 02 December 2002 1:01 pm, Joe Conway wrote:
> Steve Crawford wrote:
> > Thanks - I had read that document but overlooked array_dims (I had looked
> > for such functions using \df in psql but array_dims isn't listed). The
> > values returned are not two-dimensional but rather a start:end element of
> > an array (see notes below).
> >
> > Ideally I'd like to get a single int that is the size of the array rather
> > than the min and max element of the array that array_dims returns but I
> > don't see a built-in function that does that.
>
> FWIW, in cvs (7.4devel) there are array_lower() and array_upper()
> functions, which return ints. Unfortunately they didn't make it into 7.3.
>
> Joe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Mascari 2002-12-03 16:40:09 Re: 7.3 -> pg_atoi: zero-length string
Previous Message Larry Rosenman 2002-12-03 16:34:19 Re: [HACKERS] 7.3 -> pg_atoi: zero-length string