[postgis-devel] why this difference when sub-query

nicklas.aven at jordogskog.no nicklas.aven at jordogskog.no
Mon Jul 13 01:07:43 PDT 2009


I'm working on the regression-tests for the distance-functions and don't really understand the behavior of postgis or the planner or what it is, doing it.
 
if I run:
select st_astext(geom1) from
(select NULL as geom1) a;
 
I get:

FEIL:  failed to find conversion function from unknown to geometry

********** Error **********
FEIL: failed to find conversion function from unknown to geometry
SQL state: XX000
 
but if I run:
select st_astext(NULL)
or
select st_astext(NULL) from
(select NULL as geom1) a;
 
then I just get an empty answer without error-message.
 
and if I run :
 
select geom1 from
(select NULL as geom1) a;
 
I also get just an empty answer.
 
Why is this conversion-function trigged when I use a sub-query and not otherwise and only if I use the NULL-value in a function and not if I just show it.
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20090713/f832a893/attachment.html>


More information about the postgis-devel mailing list