[postgis-users] Problem with subselects

Jan Hartmann jhart at frw.uva.nl
Tue Oct 22 05:04:41 PDT 2002


Afraid I pushed the "Send" button too soon. The following two DATA 
statements also crash:

the_geom from (select c1.the_geom, c1.oid,c2.id
     from continents as c1, continents2 as c2
     where c1.id = c2.id) as foo
the_geom from (select c1.the_geom, c1.oid,c2.id
     from continents as c1, continents2 as c2
     where c1.id = c2.id) as foo using SRID=4326

so a fifth rule would be:

- projected and unprojected tables cannot be used together
   in subqueries. Non-map tables (i.e. without any geometry field)
   can be used without restrictions.

which makes perfect sense.

Jan

Jan Hartmann wrote:

> As you can see:
> - oid can be spelled upper- or lowercase
> - simple queries work on projected and unprojected maps
> - subqueries also work with projected and unprojected maps
>   as long as you don't specify the SRID explicitly
> - unprojected maps can't be used in a subquery which specifies
>   the SRID
> 





More information about the postgis-users mailing list