[fdo-users] Can the FDO PostGIS provider use views?

John Pulles john.pulles at geodan.nl
Thu Dec 20 03:54:14 EST 2007


Jason Birch schreef:
> I agree that the provider should probably give access to spatial views
> also.
>
> John, regardless of whether you have the resource to fix the problem
> (which would be cool; Mateusz has a lot on his plate), please submit
> this as an issue in our Trac instance:
> http://trac.osgeo.org/fdo/wiki/SubmitTicket
>   
Jason, Greg,

I managed to register for the Trac site and am busy submitting the 
ticket with patch file attached, but the site is unfortunately a bit 
unresponse. It should be submitted now, but 
http://trac.osgeo.org/fdo/report/1 doesn't show anything.
Today I am unable to build and test the (attached) patch myself, but I 
will try to do that the coming days.

John.
> Jason 
>
> -----Original Message-----
> From: Greg Boone
> Subject: RE: [fdo-users] Can the FDO PostGIS provider use views?
>
> I am not sure of your background, but I was wondering if you would be in
> a position to develop a patch to fix this issue, test it and post it for
> submission?
>
> -----Original Message-----
> From: John Pulles
> Subject: [fdo-users] Can the FDO PostGIS provider use views?
>
> 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?
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
>
>
>   


-- 
John Pulles
-------------------------------------
Geodan IT b.v.
Buitenhaven 27-A
5211TP 's-Hertogenbosch
-------------------------------------
Tel: +31 (0)73 - 692 5151
Fax: +31 (0)73 - 692 5150
-------------------------------------
Postadres / mailing address
President Kennedylaan 1
1079MB Amsterdam
-------------------------------------
E-mail:  john.pulles at geodan.nl
Website: http://www.geodan.nl
-------------------------------------

-------------- next part --------------
Index: PgSpatialTablesReader.cpp
===================================================================
--- PgSpatialTablesReader.cpp	(revision 3639)
+++ PgSpatialTablesReader.cpp	(working copy)
@@ -195,7 +195,7 @@
 
     std::string sql("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_)' "
+                    "WHERE c.relkind IN ('r','v') 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 = '"


More information about the fdo-users mailing list