<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">The cell_id column is of the integer type ? or character varying type ? It must be integer to be able to <br>compare.<br>&nbsp;<br><div style="font-weight: bold; color: rgb(0, 96, 191);">IC Carlos Ruiz</div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br style="font-weight: bold; color: rgb(0, 96, 191);"><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Andy Colson &lt;andy@squeakycode.net&gt;<br><b><span style="font-weight: bold;">To:</span></b> Benoit PESTY &lt;tchule@hotmail.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> mapserver-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Fri, July 9, 2010 10:23:39 AM<br><b><span
 style="font-weight: bold;">Subject:</span></b> Re: [mapserver-users] WFS Error "column = 1" on msPostGISLayerGetShape<br></font><br>
On 7/9/2010 10:16 AM, Benoit PESTY wrote:<br>&gt; Hello,<br>&gt;<br>&gt; I have a problem configuring a WFS Service.<br>&gt;<br>&gt; My layer is defined like this:<br>&gt;<br>&gt; LAYER<br>&gt; NAME " forest_plot_layer"<br>&gt; TYPE POLYGON<br>&gt; STATUS ON<br>&gt; METADATA<br>&gt; WFS_TITLE "Forest Plots"<br>&gt; "gml_include_items" "all"<br>&gt; "gml_featureid" "cell_id"<br>&gt; END<br>&gt; DUMP TRUE<br>&gt; CONNECTIONTYPE postgis<br>&gt; CONNECTION xxxxxxxxxx<br>&gt; DATA "the_geom FROM forest_plot_layer"<br>&gt; CLASS<br>&gt; NAME "Forest Plot"<br>&gt; STYLE<br>&gt; SIZE 3<br>&gt; COLOR 0 255 0<br>&gt; OUTLINECOLOR 0 255 0<br>&gt; END<br>&gt; END<br>&gt; PROJECTION<br>&gt; "init=epsg:3035"<br>&gt; END<br>&gt; END<br>&gt;<br>&gt;<br>&gt; And I have the follwing error :<br>&gt; ------------------------------------------<br>&gt; [Tue Jul 6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error.<br>&gt; Error (ERROR: operator does not exist:
 character varying = integer LINE<br>&gt; 1: ...l_id" from forest_plot_layer where "cell_id" = 1<br>&gt; ^<br>&gt; HINT: No operator matches the given name and argument type(s). You might<br>&gt; need to add explicit type casts.<br>&gt; ------------------------------------------<br>&gt;<br>&gt; My "forest_plot_layer" table only has a "cell_id" column which is the PK<br>&gt; and a "the_geom" column.<br>&gt;<br>&gt; The WMS service works correctly.<br>&gt;<br>&gt; Does anyone have an idea?<br>&gt;<br>&gt; Thanks,<br><br>This: "gml_featureid" "cell_id"<br><br>Seems to be the culprit.&nbsp; I'm not sure what that does, if you dont need <br>it, delete it.<br><br>If you do need it, then I'd guess changing your sql to this would help:<br><br><br>DATA "the_geom FROM (select cell_id, the_geom from forest_plot_layer) as <br>subq"<br><br>... unrelated, I see you dont have "using unique" on your DATA line... I <br>believe it'll speed things up if you use it.&nbsp;
 (although I have never <br>actually tested the claim).<br><br><span>from: <a target="_blank" href="http://mapserver.org/input/vector/postgis.html">http://mapserver.org/input/vector/postgis.html</a></span><br><br>-Andy<br><br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><span><a target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span><br></div></div>
</div><br>

      </body></html>