Re: Arrays: determining size

From: Joe Conway <mail(at)joeconway(dot)com>
To: Steve Crawford <scrawford(at)pinpointresearch(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-02 21:01:03
Message-ID: 3DEBCA0F.20106@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Medi Montaseri 2002-12-02 21:02:30 Re: Segmentation fault while COPY in 7.3
Previous Message Joe Conway 2002-12-02 20:57:41 Re: Public Schema.