Skip to content
Permalink
Browse files

fix #4832: also consider schema in geometry_columns/geography columns

  • Loading branch information
jef-n committed Jan 17, 2012
1 parent 9e71b01 commit db950895cd24037de5ec738f5c24f9a8c10dff3d
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/providers/postgres/qgspostgresconn.cpp
@@ -333,7 +333,12 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
" AND pg_namespace.oid=pg_class.relnamespace"
" AND has_schema_privilege(pg_namespace.nspname,'usage')"
" AND has_table_privilege('\"'||pg_namespace.nspname||'\".\"'||pg_class.relname||'\"','select')" // user has select privilege
" ORDER BY f_table_schema,f_table_name,%2" ).arg( gtableName ).arg( columnName );
).arg( gtableName ).arg( columnName );

if ( searchPublicOnly )
sql += " AND f_table_schema='public'";

sql += QString( " ORDER BY f_table_schema,f_table_name,%1" ).arg( columnName );

QgsDebugMsg( "getting table info: " + sql );
result = PQexec( sql, i == 0 );

0 comments on commit db95089

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