AW: [mapserver-users] newbie: Error in first atttempt to use postgiswith mapserver?

Eichner, Andreas - SID-NLKM Andreas.Eichner at sid.sachsen.de
Thu Jan 15 02:58:12 PST 2009


You don't have a column "oid" in your table. May be this is because OIDs
are disabled. I assume you (or the workshop) tries to use something like
"...USING UNIQUE oid..." in the DATA definition.
You can create a integer column in the table, fill it with a sequence
and use that in the DATA definition in your map file. For example:
 
BEGIN;
ALTER TABLE bc_municipality ADD id;
CREATE SEQUENCE bc_municipality_id_seq OWNED BY bc_municipality.id;
UPDATE bc_municipality SET id =
nextval('bc_municipality_id_seq'::regclass);
COMMIT;
 
________________________________

Von: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Saka
Royban
Gesendet: Donnerstag, 15. Januar 2009 11:06
An: MapServer
Betreff: [mapserver-users] newbie: Error in first atttempt to use
postgiswith mapserver?


Hi everyone.
i've used workshop material of FOSS4G2007 (PostGIS workshop)to learn
postgis along with its data. but there is a problem
i got this error in first attempt to retrieve data from postgis:

msDrawMap(): Image handling error. Failed to draw layer named
'bc_municipality'. prepare_database(): Query error. Error declaring
cursor: ERROR: column "oid" does not exist LINE 1:
...inary(force_collection(force_2d(the_geom)),'NDR'),OID::text ... ^
With query string: DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
bc_municipality WHERE the_geom && setSRID('BOX3D(458426.1
260651.497368421,1943216.4 1373313.90263158)'::BOX3D,
find_srid('','bc_municipality ','the_geom') )
msPOSTGISLayerRetrievePGVersion(): Query error. Error executing POSTGIS
statement (msPOSTGISLayerRetrievePGVersion():select substring(version()
from 12 for (position('on' in version()) - 13)) 

i don't know what causes the problem although it sounds easy.
THX




-----Inline Attachment Follows-----

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090115/5fc9d7ad/attachment.htm>


More information about the MapServer-users mailing list