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

Bill Binko bill at BINKO.NET
Tue Aug 23 14:11:47 EDT 2005


On Tue, 23 Aug 2005, Roman Meier wrote:

...

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

Roman,
	First: quoting is a problem in mapfiles.  There is a bug on it, 
and it is inconsistent.  However, you probably cannot wait for a solution.

How about this (from PSQL):

CREATE VIEW mapserv_view AS SELECT oid, * from 
"test22_gr.planrahmen.koordinatenlinie";

Then you'll need to use the other form of the DATA statement since you 
won't have the SRID in geometry_columns table anymore:

DATA "wkb_geometry from (select wkb_geometry from mapserv_view) as innerQ 
using SRID=12345"

Where 12345 is is the SRID of your geometry.

That should get you around this.  

Hope this helps
Bill



More information about the mapserver-users mailing list