[Gfoss] geometry from vista?

Salvator*eL*arosa s_larosa a libero.it
Lun 7 Gen 2008 20:18:41 CET


Salve a tutti e buon anno!

Stavo provando ad interrogare il mio db (Postgresql/Postgis) sia da 
p.mapper, qgis che da sql commander facendo una select su una vista
anzichè una tabella, ma evidentemente sbaglio qualcosa!!!!

L'errore che mi dà shp2pgsql è:

sam a debian:~$ shp2img -m /home/sam/www/SISNCMS/config/default/CMS.map -l
vista_sen -o /home/sam/Desktop/vis.png
msDrawMap(): Image handling error. Failed to draw layer named 'vista_sen'.
<br>
prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual
query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
"cod_cai"::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text
from public.vista_sen WHERE the_geom && setSRID('BOX3D(2614649.00000002
4312948.99999991,2653614.00000012 4351913.99999999)'::BOX3D,
find_srid('','public.vista_sen','the_geom') )'

Postgresql reports the error as 'ERROR:  la colonna "oid" non esiste at
character 112
'

More Help:

Error with POSTGIS data variable. You specified 'check your .map file'.
Standard ways of specifiying are :
(1) 'geometry_column from geometry_table'
(2) 'geometry_column from (sub query) as foo using unique column name using
SRID=srid#'

Make sure you put in the 'using unique  column name' and 'using SRID=#'
clauses in.

For more help, please see http://postgis.refractions.net/documentation/

Mappostgis.c - version of Jan 23/2004.
 <br>

Invece Qgis mi da come errore: sintetizzo io: "non trovo la colonna chiave
primaria"


Sia il primo che il secondo errore di solito mi si presentava 
quando non  impostavo una chiave primaria
oppure quando creavo una tabella con geometrie WITHOUT OIDS!

Quello che gradirei sapere è se la vista di una tabella si 
porta dietro anche le costrizioni (tipo PK ecc) oppure no?...



grazie

SL

-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
-- 
View this message in context: http://www.nabble.com/geometry-from-vista--tp14673520p14673520.html
Sent from the Gfoss mailing list archive at Nabble.com.




Maggiori informazioni sulla lista Gfoss