ERROR: column 'oid' does not exist

Tyler Mitchell tylermitchell at SHAW.CA
Fri Jun 23 01:56:38 EDT 2006


On 22-Jun-06, at 8:50 PM, Aaron Koning wrote:

> If you imported the spatial layer with shp2pgsql or OGR programs,  
> their should be a unique id field already (e.g. 'gid' with  
> shp2pgsql). You can tell MapServer to use this unique id field  
> instead of oid in the LAYER -> DATA variable of your MapFile.
>
> Example:
>      DATA "the_geom FROM roads AS foo USING UNIQUE gid"
>
That's a much better - thanks Aaron.  I'm told by postgresql gurus  
not to ever use the oid... that it should only be used for internal  
database key purposes and cannot be relied on as stable.  Oh well,  
thanks for pointing out a better option.

Tyler



More information about the mapserver-users mailing list