Re: How do I run a search on array - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: How do I run a search on array
Date
Msg-id Pine.BSF.4.10.10009202059460.59740-100000@megazone23.bigpanda.com
Whole thread Raw
In response to How do I run a search on array  (Indraneel Majumdar <indraneel@www.cdfd.org.in>)
List pgsql-sql
On Thu, 21 Sep 2000, Indraneel Majumdar wrote:

> select col1 from table while array_col[1][1:4]='2';
> 
> how do I do this sort of thing? There seems to be no docs ;-(
> 
> my array is {{"1","2","4","2"},{"3","2","5"},{"6","3","7","9"}}

You'll want to check out the array utilities in the contrib directory.
They include element is member of array and other such functions and
will probably do what you need.
> I would also like to know that if I have an array as a large object, is it
> possible to do a search on it using rows and columns (or by any other
> way)?
You're putting array style data into a large object with the lo_
functions?  Probably not in a meaningful way, no (although I'd guess that
toast might work for that kind of application when 7.1 comes out.)




pgsql-sql by date:

Previous
From: Indraneel Majumdar
Date:
Subject: How do I run a search on array
Next
From: Forest Wilkinson
Date:
Subject: C functions and int8?