Skip to content
Permalink
Browse files

fix of by one in d62cf51

  • Loading branch information
jef-n committed Oct 18, 2012
1 parent b5412cb commit 9cb43a5069ee33f892af7850ebe7e35d2c59825d
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/providers/postgres/qgspostgresconn.cpp
@@ -432,14 +432,17 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
// skip columns of which we already derived information from the metadata tables
if ( nColumns > 0 )
{
sql += " AND (pg_namespace.nspname,pg_class.relname,pg_attribute.attname) NOT IN (SELECT f_table_schema,f_table_name,f_geometry_column FROM geometry_columns)";

if ( foundInTables & 1 )
{
sql += " AND (pg_namespace.nspname,pg_class.relname,pg_attribute.attname) NOT IN (SELECT f_table_schema,f_table_name,f_geography_column FROM geography_columns)";
sql += " AND (pg_namespace.nspname,pg_class.relname,pg_attribute.attname) NOT IN (SELECT f_table_schema,f_table_name,f_geometry_column FROM geometry_columns)";
}

if ( foundInTables & 2 )
{
sql += " AND (pg_namespace.nspname,pg_class.relname,pg_attribute.attname) NOT IN (SELECT f_table_schema,f_table_name,f_geography_column FROM geography_columns)";
}

if ( foundInTables & 4 )
{
sql += " AND (pg_namespace.nspname,pg_class.relname,pg_attribute.attname) NOT IN (SELECT schema_name,table_name,feature_column FROM topology.layer)";
}

0 comments on commit 9cb43a5

Please sign in to comment.
You can’t perform that action at this time.