[mapserver-users] Trouble connecting to PostGIS

Puneet Kishor punk.kish at gmail.com
Mon Feb 13 14:05:42 PST 2012


On Feb 13, 2012, at 3:35 PM, Bistrais, Bob wrote:

> Thanks Brent.  The postgis user SHOULD have access to the table, as that
> is the table's owner.  Coordinate system is in the map file under
> Projection.
> 
> 
> 
> Here is what the debug log showed me (Metwp100Poly is the actual name of
> the table, and MAINE is the layer name):
> 
> 
> 
> [Mon Feb 13 16:31:32 2012].453000 CGI Request 1 on process 1300
> 
> [Mon Feb 13 16:31:32 2012].687000 msPOSTGISLayerRetrievePGVersion():
> Query error. Error executing POSTGIS statement
> (msPOSTGISLayerRetrievePGVersion():select substring(version() from 12
> for (position('on' in version()) - 13))
> 
> [Mon Feb 13 16:31:32 2012].687000 prepare_database(): Query error. Error
> declaring cursor: ERROR:  relation "metwp100poly" does not exist
> ..

The error above is telling you that it can't even find the said table. 

Can you SELECT from this table successfully in PgAdmin?

Is it in a different schema than public, and perhaps that schema is not in the searchpath?

Does the postgisuser have access to this table?

--
Puneet Kishor


More information about the MapServer-users mailing list