<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 10.00.9200.16635"></HEAD>
<BODY>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2 face=Arial>Hi
all,</FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2
face=Arial>I am trying to use a b view in Postgis 2.0.2 ("POSTGIS="2.0.2
r10789" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL
1.10.0, released 2013/04/24" LIBXML="2.8.0" LIBJSON="UNKNOWN" TOPOLOGY
RASTER")</FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2 face=Arial>for
display via MapServer 6.2 </FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2 face=Arial>I am
getting an this error from MapServer:</FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2 face=Arial>Failed
to draw layer named 'members'.<BR>msPostGISLayerWhichShapes():
Query error. Error executing query: ERROR: column
"COUNT" does not exist<BR>LINE 1: select
"COUNT",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR').</FONT></SPAN></DIV>
<DIV><FONT color=#000080 size=2 face=Arial></FONT> </DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2 face=Arial>I have
no idea why a count is needed here or where this field is coming from ...seems
that the regular table have no issue with this. </FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2 face=Arial>My
VIEW public.geometry_columns shows these values for the
view:</FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2
face=Arial>"xy";"xy";"myloc";"geom";2;4269;"POINT"</FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2 face=Arial>What
can I do to fix this in Postgis ?</FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2 face=Arial>See
below for view details</FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2
face=Arial>Cheers</FONT></SPAN></DIV>
<DIV><SPAN class=731032109-24072013><FONT color=#000080 size=2
face=Arial>Karsten</FONT></SPAN></DIV><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: 'Verdana','sans-serif'">
<DIV><BR><SPAN style="COLOR: #003264">Terra GIS LTD<BR></SPAN></DIV>
<DIV><SPAN style="COLOR: #003264"><SPAN
class=731032109-24072013>-------------------------</SPAN></SPAN></DIV>
<DIV><SPAN style="COLOR: #003264"><SPAN class=731032109-24072013>-- View:
</SPAN></SPAN></DIV>
<DIV><SPAN style="COLOR: #003264"><SPAN class=731032109-24072013><FONT
color=#000080 size=2 face=Arial>CREATE OR REPLACE VIEW xy.test
AS <BR> SELECT
xy.census_city_id, st_centroid(places.geom)::geometry(Point,4269) AS geom,
places.name<BR> FROM
myschema.xy,myschema.places <BR> WHERE xy.census_city_id =
places.geoid::integer;
<BR>ALTER TABLE
myschema.xy_loc <BR><BR>OWNER TO
myuser; </FONT></SPAN></SPAN></DIV>
<DIV><SPAN style="COLOR: #003264"><SPAN class=731032109-24072013><FONT
color=#000080 size=2 face=Arial></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN style="COLOR: #003264"><SPAN class=731032109-24072013><FONT
color=#000080 size=2
face=Arial>-----------------------------------</FONT></SPAN></SPAN></DIV>
<DIV><SPAN style="COLOR: #003264"><SPAN class=731032109-24072013><FONT
color=#000080 size=2 face=Arial>in mapfile:</FONT></SPAN></SPAN></DIV>
<DIV><SPAN style="COLOR: #003264"><SPAN class=731032109-24072013><FONT
color=#000080 size=2 face=Arial><BR>DATA "geom from (select * from myschema.xy)
as temp using unique gid using SRID=4269"
</FONT></SPAN></DIV></SPAN></SPAN></BODY></HTML>