Re: multidimensional arrays

From: Ketema <ketema(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: multidimensional arrays
Date: 2007-05-02 16:50:58
Message-ID: 1178124658.304402.130680@y80g2000hsf.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On May 1, 10:48 pm, t(dot)(dot)(dot)(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) wrote:
> Ketema <ket(dot)(dot)(dot)(at)gmail(dot)com> writes:
> > Is it possible to access a subarray of a multi dimensional array as a
> > whole?
>
> I think you want an array slice (ie, something with some colons in the
> subscripts). See the manual:http://www.postgresql.org/docs/8.2/static/arrays.html
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majord(dot)(dot)(dot)(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

OK, sorry I missed that. still not sure I understand even after
reading that.

for my above example I would then use:

select case when 1 = any(_intarray[1:1][1:1]) then true else false
end; ?

and it should return true since a 1 exists in that first subarray?

thanks

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-05-02 16:59:24 Re: pgsql and Mac OS X
Previous Message Alexander Staubo 2007-05-02 16:03:59 Re: Postgres (selection of thesis topic)