Skip to content

Commit

Permalink
fix slowdown of r12418
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12440 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 13, 2009
1 parent 1415ff6 commit 6aa4746
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6aa4746

Please sign in to comment.