Skip to content

Commit

Permalink
postgres provider: clear primary key for views (potentially fixes #9590)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 18, 2014
1 parent 7138c7a commit 7f5aac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresconn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ void QgsPostgresConn::addColumnInfo( QgsPostgresLayerProperty& layerProperty, co
QgsDebugMsg( sql );
QgsPostgresResult colRes = PQexec( sql );

layerProperty.pkCols.clear();
layerProperty.nSpCols = 0;

if ( colRes.PQresultStatus() == PGRES_TUPLES_OK )
Expand Down Expand Up @@ -414,7 +415,6 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
.arg( srid )
.arg( relkind ) );

layerProperty.pkCols.clear();
layerProperty.schemaName = schemaName;
layerProperty.tableName = tableName;
layerProperty.geometryColName = column;
Expand Down

0 comments on commit 7f5aac3

Please sign in to comment.