Postgis/Mapserver-Problem: Tablenames with dots...

Roman Meier mapserver at GISMAP.CH
Tue Aug 23 10:36:45 PDT 2005


Dear List

I’m having a problem with Postgis/Postgresql and Mapserver. I searched the
archives but found no solution.

The error-message in Mapserver shows the following:
***************************************************
msDrawMap(): Image handling error. Failed to draw layer named
'test22_gr.planrahmen.koordinatenlinie'. 
prep_DB(): Query error. Error executing POSTGIS DECLARE (the actual query)
statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(wkb_geometry)),'NDR'),OID::text from
test22_gr.planrahmen.koordinatenlinie WHERE wkb_geometry &&
setSRID('BOX3D(699649.975666667 261476.466,700649.975666667
262476.466)'::BOX3D,
find_srid('','test22_gr.planrahmen.koordinatenlinie','wkb_geometry') )' 

Postgresql reports the error as 'ERROR: cross-database references are not
implemented: "test22_gr.planrahmen.koordinatenlinie" '

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.php 

Mappostgis.c - version of Jan 23/2004.

The mapfile contains:
*********************
LAYER
	NAME 'test22_gr.planrahmen.koordinatenlinie'
	GROUP Linie
	TYPE LINE
	STATUS ON
	CONNECTIONTYPE postgis
	CONNECTION 'user=test dbname=test host=127.0.0.1'
	DATA "wkb_geometry from test22_gr.planrahmen.koordinatenlinie"
	CLASS
		NAME 'test22_gr.planrahmen.koordinatenlinie'
		TEMPLATE 'template/test22_gr.planrahmen.koordinatenlinie.html'
		SYMBOL 'circle'
		SIZE 1
		COLOR 256 236 169
	END
	TOLERANCE 5
END

Analysis:
*********
I get the same error-message if I query the table
'test22_gr.planrahmen.koordinatenlinie' using PSQL:

Select * from test22_gr.planrahmen.koordinatenlinie
--> 520=# ERROR:  cross-database references are not implemented:
„test22_gr.planrahmen.koordinatenlinie“

If I query the table by adding quotation marks everything works fine:
Select * from "test22_gr.planrahmen.koordinatenlinie"
Remark: the dots are part of the tablename!

I tried to do analog changes to the mapfile by changing the following line:
DATA "wkb_geometry from test22_gr.planrahmen.koordinatenlinie"
Into DATA "wkb_geometry from 'test22_gr.planrahmen.koordinatenlinie'"

Well - this doesn’t work and I can’t solve the problem.

Any ideas...?

Thanks in advance
Roman



More information about the MapServer-users mailing list