Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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/qgis@5959 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Oct 14, 2006
1 parent a07b9d5 commit 828e7f2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -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, "
Expand All @@ -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 "
Expand All @@ -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;
Expand Down

0 comments on commit 828e7f2

Please sign in to comment.