Skip to content
Permalink
Browse files
Reversion of change to the sql that worked out what view column depen…
…d on

which table columns - the recent commit didn't work when the database had more
than one view, and in fact made things worse. Needs further work.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5959 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Oct 14, 2006
1 parent 6c5c204 commit 75b6817
Showing 1 changed file with 2 additions and 5 deletions.
@@ -1346,7 +1346,7 @@ void QgsPostgresProvider::findColumns(tableCols& cols)
"SELECT DISTINCT "
" nv.nspname AS view_schema, "
" v.relname AS view_name, "
" va.attname AS view_column_name, "
" a.attname AS view_column_name, "
" nt.nspname AS table_schema, "
" t.relname AS table_name, "
" a.attname AS column_name, "
@@ -1360,7 +1360,6 @@ void QgsPostgresProvider::findColumns(tableCols& cols)
" pg_class t, "
" pg_namespace nt, "
" pg_attribute a,"
" pg_attribute va,"
" pg_user u, "
" pg_type typ "
"WHERE "
@@ -1380,9 +1379,7 @@ void QgsPostgresProvider::findColumns(tableCols& cols)
" t.oid = a.attrelid AND "
" dt.refobjsubid = a.attnum AND "
" nv.nspname NOT IN ('pg_catalog', 'information_schema' ) AND "
" a.atttypid = typ.oid AND "
" v.oid = va.attrelid AND "
" va.attnum = dt.refobjsubid";
" a.atttypid = typ.oid";

// A structure to store the results of the above sql.
typedef std::map<QString, TT> columnRelationsType;

0 comments on commit 75b6817

Please sign in to comment.