fix slowdown of r12418

git-svn-id: http://svn.osgeo.org/qgis/trunk@12440 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2009-12-13 22:04:21 +00:00
parent 3bee39d351
commit 97d5e901b6

View File

@ -1645,6 +1645,12 @@ void QgsPostgresProvider::findColumns( tableCols& cols )
"view_schema=%1 AND view_name=%2" )
.arg( quotedValue( mSchemaName ) )
.arg( quotedValue( mTableName ) );
if ( !primaryKey.isEmpty() )
{
viewColumnSql += QString( " AND column_name=%1" ).arg( quotedValue( primaryKey ) );
}
Result viewColumnResult = connectionRO->PQexec( viewColumnSql );
//find out view definition