<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> <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 <andy@squeakycode.net><br><b><span style="font-weight: bold;">To:</span></b> Benoit PESTY <tchule@hotmail.com><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>> Hello,<br>><br>> I have a problem configuring a WFS Service.<br>><br>> My layer is defined like this:<br>><br>> LAYER<br>> NAME " forest_plot_layer"<br>> TYPE POLYGON<br>> STATUS ON<br>> METADATA<br>> WFS_TITLE "Forest Plots"<br>> "gml_include_items" "all"<br>> "gml_featureid" "cell_id"<br>> END<br>> DUMP TRUE<br>> CONNECTIONTYPE postgis<br>> CONNECTION xxxxxxxxxx<br>> DATA "the_geom FROM forest_plot_layer"<br>> CLASS<br>> NAME "Forest Plot"<br>> STYLE<br>> SIZE 3<br>> COLOR 0 255 0<br>> OUTLINECOLOR 0 255 0<br>> END<br>> END<br>> PROJECTION<br>> "init=epsg:3035"<br>> END<br>> END<br>><br>><br>> And I have the follwing error :<br>> ------------------------------------------<br>> [Tue Jul 6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error.<br>> Error (ERROR: operator does not exist:
 character varying = integer LINE<br>> 1: ...l_id" from forest_plot_layer where "cell_id" = 1<br>> ^<br>> HINT: No operator matches the given name and argument type(s). You might<br>> need to add explicit type casts.<br>> ------------------------------------------<br>><br>> My "forest_plot_layer" table only has a "cell_id" column which is the PK<br>> and a "the_geom" column.<br>><br>> The WMS service works correctly.<br>><br>> Does anyone have an idea?<br>><br>> Thanks,<br><br>This: "gml_featureid" "cell_id"<br><br>Seems to be the culprit.  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. 
 (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>