Skip to content

Commit 97d5e90

Browse files
author
jef
committedDec 13, 2009
fix slowdown of r12418
git-svn-id: http://svn.osgeo.org/qgis/trunk@12440 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3bee39d commit 97d5e90

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,6 +1645,12 @@ void QgsPostgresProvider::findColumns( tableCols& cols )
16451645
"view_schema=%1 AND view_name=%2" )
16461646
.arg( quotedValue( mSchemaName ) )
16471647
.arg( quotedValue( mTableName ) );
1648+
1649+
if ( !primaryKey.isEmpty() )
1650+
{
1651+
viewColumnSql += QString( " AND column_name=%1" ).arg( quotedValue( primaryKey ) );
1652+
}
1653+
16481654
Result viewColumnResult = connectionRO->PQexec( viewColumnSql );
16491655

16501656
//find out view definition

0 commit comments

Comments
 (0)