Array problem

From: Panagiotis Papadakos <papadako(at)csd(dot)uoc(dot)gr>
To: pgsql-general(at)postgresql(dot)org
Subject: Array problem
Date: 2008-06-26 07:34:05
Message-ID: Pine.LNX.4.64.0806261029000.30666@kiwi.csd.uoc.gr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi everybody.

I have created a table containing an array of points
(each point exists only once in the array).

CREATE TABLE lala (id INT NOT NULL, occur point[] not NULL, PRIMARY
KEY(id));

I am trying to find a way to get the position of array elements
that have a specific x coordinate.

How can I do it?

P.S.

select * from lala where point'(289,0)' ?| any (occur);
returns the whole tuples that have points with x=289 in their array.

Thanks in advance.

Panagiotis Papadakos

Browse pgsql-general by date

  From Date Subject
Next Message Jacek Rembisz 2008-06-26 08:40:12 Re: a question about data corruption
Previous Message Rodrigo Gonzalez 2008-06-26 06:34:59 Re: ERROR: could not open relation with OID 2836