[postgis-devel] How define a view that use a case operator for geometry field
strk at keybit.net
Fri Oct 28 11:21:31 PDT 2011
On Fri, Oct 28, 2011 at 07:11:18PM +0200, aperi2007 wrote:
> I try
> SELECT * FROM v_elemento_divisorio WHERE ST_SRID(geom) = 0;
> the result was an empty recordset.
> (very strange for me)
> After this I change (following your suggest) the view with:
> when a.codlinea<>'' then b.geom::geometry(LINESTRING,3003)
> else c.geom::geometry(LINESTRING,3003)
> end as geom
> And it work ! (wow)
> why the first view don't give any error ?
I guess PostgreSQL can't assume the columns is
if one of the fields is possibly an unspecified
See also \d theview, it should tell you the field type
including geometry type (typmod).
() Free GIS & Flash consultant/developer
More information about the postgis-devel