<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thanks for the answers,<div><br></div><div>Apparently removing the "gml_featureid" "cell_id" line doesn't change anything. I suppose that the PK is detected and used.</div><div><br></div><div>I have solved the problem by adding "USING UNIQUE oid".</div><div><br></div><div>Thanks,<br><br><br><br>&gt; Date: Fri, 9 Jul 2010 11:19:48 -0500<br>&gt; From: andy@squeakycode.net<br>&gt; To: boolean10001@yahoo.com<br>&gt; CC: tchule@hotmail.com; mapserver-users@lists.osgeo.org<br>&gt; Subject: Re: [mapserver-users] WFS Error "column = 1" on msPostGISLayerGetShape<br>&gt; <br>&gt; Oh... Yeah... I should pay more attention to the actual message:<br>&gt; <br>&gt;  &gt; HINT: No operator matches the given name and argument type(s). You might<br>&gt;  &gt; need to add explicit type casts.<br>&gt; <br>&gt; This was not a "field not found" message, I fixed the wrong thing.. <br>&gt; oops.  Good catch Carlos.<br>&gt; <br>&gt; -Andy<br>&gt; <br>&gt; <br>&gt; <br>&gt; On 7/9/2010 11:15 AM, Carlos Ruiz wrote:<br>&gt; &gt; The cell_id column is of the integer type ? or character varying type ?<br>&gt; &gt; It must be integer to be able to<br>&gt; &gt; compare.<br>&gt; &gt;<br>&gt; &gt; IC Carlos Ruiz<br>&gt; &gt;<br>&gt; &gt; ------------------------------------------------------------------------<br>&gt; &gt; *From:* Andy Colson &lt;andy@squeakycode.net&gt;<br>&gt; &gt; *To:* Benoit PESTY &lt;tchule@hotmail.com&gt;<br>&gt; &gt; *Cc:* mapserver-users@lists.osgeo.org<br>&gt; &gt; *Sent:* Fri, July 9, 2010 10:23:39 AM<br>&gt; &gt; *Subject:* Re: [mapserver-users] WFS Error "column = 1" on<br>&gt; &gt; msPostGISLayerGetShape<br>&gt; &gt;<br>&gt; &gt; On 7/9/2010 10:16 AM, Benoit PESTY wrote:<br>&gt; &gt;  &gt; Hello,<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; I have a problem configuring a WFS Service.<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; My layer is defined like this:<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; LAYER<br>&gt; &gt;  &gt; NAME " forest_plot_layer"<br>&gt; &gt;  &gt; TYPE POLYGON<br>&gt; &gt;  &gt; STATUS ON<br>&gt; &gt;  &gt; METADATA<br>&gt; &gt;  &gt; WFS_TITLE "Forest Plots"<br>&gt; &gt;  &gt; "gml_include_items" "all"<br>&gt; &gt;  &gt; "gml_featureid" "cell_id"<br>&gt; &gt;  &gt; END<br>&gt; &gt;  &gt; DUMP TRUE<br>&gt; &gt;  &gt; CONNECTIONTYPE postgis<br>&gt; &gt;  &gt; CONNECTION xxxxxxxxxx<br>&gt; &gt;  &gt; DATA "the_geom FROM forest_plot_layer"<br>&gt; &gt;  &gt; CLASS<br>&gt; &gt;  &gt; NAME "Forest Plot"<br>&gt; &gt;  &gt; STYLE<br>&gt; &gt;  &gt; SIZE 3<br>&gt; &gt;  &gt; COLOR 0 255 0<br>&gt; &gt;  &gt; OUTLINECOLOR 0 255 0<br>&gt; &gt;  &gt; END<br>&gt; &gt;  &gt; END<br>&gt; &gt;  &gt; PROJECTION<br>&gt; &gt;  &gt; "init=epsg:3035"<br>&gt; &gt;  &gt; END<br>&gt; &gt;  &gt; END<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; And I have the follwing error :<br>&gt; &gt;  &gt; ------------------------------------------<br>&gt; &gt;  &gt; [Tue Jul 6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error.<br>&gt; &gt;  &gt; Error (ERROR: operator does not exist: character varying = integer LINE<br>&gt; &gt;  &gt; 1: ...l_id" from forest_plot_layer where "cell_id" = 1<br>&gt; &gt;  &gt; ^<br>&gt; &gt;  &gt; HINT: No operator matches the given name and argument type(s). You might<br>&gt; &gt;  &gt; need to add explicit type casts.<br>&gt; &gt;  &gt; ------------------------------------------<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; My "forest_plot_layer" table only has a "cell_id" column which is the PK<br>&gt; &gt;  &gt; and a "the_geom" column.<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; The WMS service works correctly.<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; Does anyone have an idea?<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; Thanks,<br>&gt; &gt;<br>&gt; &gt; This: "gml_featureid" "cell_id"<br>&gt; &gt;<br>&gt; &gt; Seems to be the culprit. I'm not sure what that does, if you dont need<br>&gt; &gt; it, delete it.<br>&gt; &gt;<br>&gt; &gt; If you do need it, then I'd guess changing your sql to this would help:<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; DATA "the_geom FROM (select cell_id, the_geom from forest_plot_layer) as<br>&gt; &gt; subq"<br>&gt; &gt;<br>&gt; &gt; ... unrelated, I see you dont have "using unique" on your DATA line... I<br>&gt; &gt; believe it'll speed things up if you use it. (although I have never<br>&gt; &gt; actually tested the claim).<br>&gt; &gt;<br>&gt; &gt; from: http://mapserver.org/input/vector/postgis.html<br>&gt; &gt;<br>&gt; &gt; -Andy<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; mapserver-users mailing list<br>&gt; &gt; mapserver-users@lists.osgeo.org &lt;mailto:mapserver-users@lists.osgeo.org&gt;<br>&gt; &gt; http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>&gt; &gt;<br>&gt; <br></div>                                               <br /><hr />The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. <a href='http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4' target='_new'>Get busy.</a></body>
</html>