Re: Arrays: determining size - Mailing list pgsql-general

From Joel Burton
Subject Re: Arrays: determining size
Date
Msg-id 20021202182630.GA12713@temp.joelburton.com
Whole thread Raw
In response to Arrays: determining size  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general
On Mon, Dec 02, 2002 at 09:58:42AM -0800, Steve Crawford wrote:
> Given a variable length array data type in a table:
> create table foo (bar text[]);
>
> and some data:
> insert into foo values ('{"a","b","c"'});
> insert into foo values ('{"1","2","3","4"}');
>
> Is there a simple way to determe the size of each array?

In contrib/intarray (excellent, BTW), there are features for sizing and
matching integer arrays. Possibly you can either stick with integer
arrays, or adapt the code to non-integer cases.

Would be great if someone would modify all of intarray for text[] -- I'd
love to use the matching language on some projects!

- J.
--

Joel BURTON  |  joel@joelburton.com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: ALTER TABLE & COLUMN
Next
From: Felipe Schnack
Date:
Subject: Re: RPMS for 7.3