Hi,

Now it seems to be a problem of types: "procedure_id" is a string and 
the "WHERE" try to evaluate it as a numeric value.

You should try directly in your db (pgAdmin3 or psql client line 
interface for instance) the query extracted from the error log :
"SELECT 
"procedure_id"::text,"procedure_description_url"::text,"procedure_description_type"::text,"feature_of_interest_id"::text,"feature_of_interest_name"::text,"feature_of_interest_description"::text,"type"::text,"schema_link"::text,asbinary(force_collection(force_2d(geom)),'NDR')
 

from procedure_location WHERE procedure_id = 0"

I think you will have the error mentioned in the log :
"ERROR:  operator does not exist: character varying = integer
...
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts."

If I'm right, change your view declaration to use procedure_id as an 
integer or change the query declaration to use it as a string.

Thomas


Sidney Gijzen a écrit :
> Hi Marcello,
>
> Thank you very much for your suggestion! I created a view (which works 
> :)), however I get the following php-error when querying the layer:
>
>
> [27-Jul-2009 15:16:15] PHP Fatal error:  [MapServer Error]: 
> msPOSTGISLayerGetShape(): Error executing POSTGIS SQL statement (in 
> FETCH ALL): DECLARE mycursor2 BINARY CURSOR FOR SELECT 
> "procedure_id"::text,"procedure_description_url"::text,"procedure_description_type"::text,"feature_of_interest_id"::text,"feature_of_interest_name"::text,"feature_of_interest_description"::text,"type"::text,"schema_link"::text,asbinary(force_collection(force_2d(geom)),'NDR')
>  
> from procedure_location WHERE procedure_id = 0
> -ERROR:  operator does not exist: character varying = integer
> LINE 1: ...geom)),'NDR') from procedure_location WHERE procedure_id = 0
>                                                                     ^
> HINT:  No operator matches the given name and argument type(s). You 
> might need to add explicit type casts.
>
>
> So, I guess I need an integer field somewhere in my db-table? Or is 
> there a possibility to cast "on the fly"?
>
> Thank you in advance!
>
> Sidney
>
>
> Marcello Benigno wrote:
>   
>> Hi Sidney,
>>
>> I have one similar problem, and the solution was create a view in DB 
>> and use as follows:
>>
>> ...
>> DATA
>>  "the_geom" from myView ...
>> ....
>>
>> []'s
>>
>>
>> 2009/7/27 Sidney Gijzen <sidneygij...@gmail.com 
>> <mailto:sidneygij...@gmail.com>>
>>
>>     Hello,
>>
>>     I forgot to add some version info. I'm working with the following
>>     setup:
>>
>>     p.mapper 4.0 dev
>>     PostGIS 1.3.6
>>     PostgreSQL 8.3
>>     Mapserver 5.2.1
>>
>>     I hope this is helpful :) If you need more info, please ask.
>>
>>     Thank you in advance,
>>
>>     Sidney
>>
>>     
>> ------------------------------------------------------------------------------
>>     _______________________________________________
>>     pmapper-users mailing list
>>     pmapper-users@lists.sourceforge.net
>>     <mailto:pmapper-users@lists.sourceforge.net>
>>     https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>
>>
>>
>>
>> -- 
>> Marcello Benigno B. de Barros Filho
>> Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
>> Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
>>     
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>
>
>
>
>
>   
------------------------------------------------------------------------------
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to