[postgis-users] PostGis 8.1 - error with "using unique"

jerome jerome.caba at vanoise.com
Thu Dec 1 07:08:44 PST 2005


Hello,

I'm a newbie with postgis, i have a problem with a query.
First, I have installed postgresql8.0.4 and Postgis 1.0.4. I have a 
table, "alpages", with a geometry column, "geounitealpage25" (polygon).
I want to obtain this table in a mapserver png and I wrote this code 
with php :
$table_choisie = "unites_alpage";
$colonne_geometrique = "geounitealpage25";
$layer = ms_newLayerObj($map);
$layer->set("name",$base_de_donnees);
$layer->set("status",MS_DEFAULT);
$layer->set("connectiontype",MS_POSTGIS);
$layer->set("connection","user=".$utilisateur." 
dbname=".$base_de_donnees." host=".$hote);
$layer->set("data",$colonne_geometrique." from ".$table_choisie." as foo");

With pgsql8.0.4, this code works correctly, but, I have migrated the 
pgsql server with the 8.1 version and the only thing I can obtain is :  
"Warning: [MapServer Error]: prepare_database(): Error executing POSTGIS 
DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR 
FOR SELECT 
nom_unitealpage::text,asbinary(force_collection(force_2d(geounitealpage25)),'NDR'),OID::text 
from unites_alpage as foo WHERE geounitealpage25 && 
setSRID('BOX3D(914512.28125 2020889.755,977907.28125 
2088215.245)'::BOX3D, find_srid('','unites_alpage as 
foo','geounitealpage25') )'
Postgresql reports the error as 'ERROR: column "oid" does not exist '"

I don't why this error occurs with the 8.1 version. Can you help me ?
Many thanks, and sorry for my bad (very) english

Jerome Caba




More information about the postgis-users mailing list