[postgis-users] Spatial Selects

ANDREW WOOLEY AWOOLEY at mountainland.org
Tue Jun 1 07:00:48 PDT 2004


Folks,

I apologize in advance if this has come up before and I was blissfully
unaware of the situation and missed out on the discussion. 

I am currently redeploying my database on a new server and in doing so,
I have upgraded to Postgres 7.4.2 and PostGIS 0.8.2. I using this
query:

select grid_code as elevation 
from elev30 
where (the_geom && (select transform(the_geom,26712) from bsttrail
where gid = 85));

This did what I wanted in my previous version - 7.2 something or less. 
It returned the grid_code that intersected my trail.  Now, with the new
version this query returns an error: 
"more than one row returned by a subquery used as an expression". 

I have seen this error addressed on the list, but it seems that it was
unrelated to my problem. In doing some research on the Postgres list, it
seems that this was changed in the 7.4.x releases. I know it has
something to do with aggregation, but when I use collect, it doesn't
aggregate the geometry properly and it doesn't give the results I need.


I feel like there must be an easy solution, but I can't seem to find
it.  I would appreciate any help you folks could offer.

Andrew



More information about the postgis-users mailing list