[postgis-users] Problem with 'using unique' in Mapserver DATA statement

Bill Binko bill at binko.net
Wed Sep 7 22:33:33 PDT 2005


I reported this recently: it's Bug #1443 in the Mapserver bugzilla 
database.

Per Frank's suggestion, I have backed out the mappostgis.c version to a 
July version.  However,  there is a workaround.

The change that was put in place (that introduced the bug) is a default 
that sets the UNIQUE parameter to oid if it's not set.  So, you can change 
your DATA statement to this and get around it:

DATA "geom from (select geom, gid as oid, pearseda from pda42304) as foo 
using SRID=42304"

That will alias gid to 'oid' and the default will make it work.

Yes: this is a huge hack, and it's a bug (hence my report).  However, it 
might get you working.

Bill



On Wed, 7 Sep 2005, Debbie Pagurek wrote:

> strk at refractions.net wrote:
> 
> >On Wed, Sep 07, 2005 at 12:25:57PM -0400, Debbie Pagurek wrote:
> >  
> >
> >>I seem to have a problem using UNIQUE indexes in my MapServer Data 
> >>statements.
> >>
> >>This doesn't work:
> >>DATA "geom from (select geom, oid,gid, pearseda from pda42304) as foo 
> >>using unique gid using SRID=42304"
> >>    
> >>
> >
> >Did you try swapping "using unique gid" and "using SRID=42304" ?
> >(the mapserver connector is pretty dumb)
> >
> >--strk;
> >_______________________________________________
> >postgis-users mailing list
> >postgis-users at postgis.refractions.net
> >http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> >  
> >
> I just realized that it's the version of MapServer I'm using. I'm using 
> the windows binary version 4.7. When I tried with the 4.6 windows 
> binary, it worked fine. Argh.
> 
> I'll let the mapserver people know.
> 
> Debbie Pagurek
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 

> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 



More information about the postgis-users mailing list