Umberto,

Thanks. I'm using the DM Solutions MS4W install, but I'm not too
concerned about it since there is a workaround.  I'm more concerned
about if it will affect others using pre-compiled installs with the new
PostgreSQL 8.3 stack builder version so thought I would mention as an
FYI if a permanent solution can be made rather than a custom workaround.

Thanks,
Regina  

-----Original Message-----
From: Umberto Nicoletti [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 08, 2008 8:39 AM
To: Obe, Regina
Cc: [email protected]
Subject: Re: [UMN_MAPSERVER-USERS] PostgreSQL 8.3 and UMN Mapserver
Issue

If you compiled mapserver yourself apply the following patch (a quick
and dirty fix to your problem), otherwise you might want to rebuild
postgres so that the version() call returns a string with ON where
mapserver expects to find it:

Index: mappostgis.c
===================================================================
--- mappostgis.c        (revision 7296)
+++ mappostgis.c        (working copy)
@@ -1583,7 +1583,7 @@
     msPOSTGISLayerInfo *layerinfo;
     char *tmp;

-    sql = "select substring(version() from 12 for (position('on' in
version()) - 13))";
+    sql = "select substring(version() from 12 for (position(',' in
version()) - 12));";

     if(debug) {
         msDebug("msPOSTGISLayerRetrievePGVersion(): query = %s\n",
sql);

Regards,
Umberto


On Feb 8, 2008 1:50 PM, Obe, Regina <[EMAIL PROTECTED]> wrote:
>
>
> Sorry for the cross-post, but I wasn't sure who's problem it is.  This
is
> not a major issue and may already be fixed but could potentially
affect
> other software besides Mapserver, but in PostgreSQL 8.2 I had a view
that I
> manually registered in the geometry_columns table.  Registering it in
the
> geometry_columns table allowed me to do this
>
>  DATA "the_geom FROM parcels"
>
>
> When testing this same database on 8.3 using the same Mapserver
postgis
> drivers with the above, I am getting this error
> MapServer error: Error in msPOSTGISLayerRetrievePGVersion(): Error
executing
> POSTGIS statement (msPOSTGISLayerRetrievePGVersion():select
> substring(version() from 12 for (position('on' in version()) - 13)).
> Regular table layers work fine regardless.
>
> But rewriting the Data part to
> DATA "the_geom FROM parcels USING UNIQUE gid USING SRID=2249"
>
> resolves the issue.  Last I had tested it was on 8.3RC2 so I thought
it was
> the RC that was throwing it off.
>
> -- This might be only an issue with PostgreSQL compiled under VC++ -
below
> are the versions returned by both.
>
> "PostgreSQL 8.2.1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2
> (mingw-special)"
>
> "PostgreSQL 8.3.0, compiled by Visual C++ build 1400"
>
> So it seems the old version always had an on in the version() return
and
> the new Stack Builder version is missing the on part.
>
> I am using MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
> OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ
SUPPORTS=AGG
> SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
> SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
> INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> Mapscript: ($Revision: 6872 $ $Date: 2007-09-10 10:45:30 -0400 (Mon,
10 Sep
> 2007) $)
>
>
> Thanks,
> Regina
>
>
>
>
>
>
>
>
>
>
> ________________________________
>
>
>  The substance of this message, including any attachments, may be
> confidential, legally privileged and/or exempt from disclosure
pursuant to
> Massachusetts law. It is intended solely for the addressee. If you
received
> this in error, please contact the sender and delete the material from
any
> computer.
>
> ________________________________
>
>
>  Help make the earth a greener place. If at all possible resist
printing
> this email and join us in saving paper.
>
>
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

Reply via email to