Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#202 closed enhancement (fixed)

PostGIS provider doesn't use views in geometry_columns

Reported by: jpulles Owned by: gregboone
Priority: major Milestone: 3.3.0
Component: PostGIS Provider Version: 3.3.0
Severity: 3 Keywords:
Cc: External ID:

Description

It seems that the FDO PostGIS provider doesn't show views when listing the feature sets that contain geometry. The source file PgSpatialTablesReader.cpp has an Open function that uses the following query to get a list of 'table' names:

SELECT n.nspname AS schemaname, c.relname AS tablename
FROM pg_class c, pg_namespace n, geometry_columns g
WHERE c.relkind = 'r' AND c.relname !~ '^(pg_|sql_)'
AND c.relnamespace = n.oid AND n.nspname = g.f_table_schema
AND c.relname::TEXT = g.f_table_name::TEXT
AND n.nspname = '<current schema>' GROUP BY schemaname, tablename

For views, the relkind column has a value of 'v', thus views are NOT selected by this query. Shouldn't the PostGIS provider enable usage of views that are present in the geometry_columns table?

The patch is attached but has not yet been tested. At least the sql statement works in PgAdmin, and the search term geometry_columns doesn't occur in any other cpp file of the PostGIS driver.

Attachments (1)

PgSpatialTablesReader.cpp.patch (735 bytes ) - added by jpulles 17 years ago.

Download all attachments as: .zip

Change History (5)

by jpulles, 17 years ago

comment:1 by jpulles, 17 years ago

The patch has been tested, en shows views in MapGuide Studio. Please submit to svn.

comment:2 by gregboone, 17 years ago

Owner: changed from mloskot to gregboone
Status: newassigned

comment:3 by gregboone, 17 years ago

Resolution: fixed
Status: assignedclosed

comment:4 by gregboone, 17 years ago

Version: 3.2.03.3.0
Note: See TracTickets for help on using tickets.