Skip to content

Commit a646ff6

Browse files
committedJan 12, 2012
apply #4167
1 parent 2b739d9 commit a646ff6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/providers/postgres/qgspostgresconn.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,13 +409,13 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
409409
if ( nColumns > 0 )
410410
{
411411
// TODO: handle this for the topogeometry case
412-
sql += " AND NOT EXISTS (SELECT * FROM geometry_columns WHERE pg_namespace.nspname=f_table_schema AND pg_class.relname=f_table_name)";
412+
sql += " AND (pg_namespace.nspname,pg_class.relname) NOT IN (SELECT f_table_schema,f_table_name FROM geometry_columns)";
413413

414414
if ( nGTables > 1 )
415415
{
416416
// TODO: handle this for the topogeometry case
417417
// TODO: handle this for the geometry case ?
418-
sql += " AND NOT EXISTS (SELECT * FROM geography_columns WHERE pg_namespace.nspname=f_table_schema AND pg_class.relname=f_table_name)";
418+
sql += " AND (pg_namespace.nspname,pg_class.relname) NOT IN (SELECT f_table_schema,f_table_name FROM geography_columns)";
419419
}
420420
}
421421
else
@@ -461,7 +461,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
461461
layerProperty.geometryColName = column;
462462
layerProperty.pkCols = relkind == "v" ? pkCandidates( schema, table ) : QStringList();
463463
layerProperty.sql = "";
464-
layerProperty.isGeography = false; // TODO might be geography after all
464+
layerProperty.isGeography = false; // TODO might be geography after all
465465

466466
mLayersSupported << layerProperty;
467467
nColumns++;

0 commit comments

Comments
 (0)
Please sign in to comment.