Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group