Skip to content

Commit 45ebe53

Browse files
committedJun 17, 2014
Merge pull request #1407 from dbaston/master
postgres provider: avoid overflow from casting index oid to integer (fixes #9005)
2 parents c27e731 + 9019b8e commit 45ebe53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ bool QgsPostgresProvider::determinePrimaryKey()
11121112
else
11131113
{
11141114
// have a primary key or unique index
1115-
int indrelid = res.PQgetvalue( 0, 0 ).toInt();
1115+
QString indrelid = res.PQgetvalue( 0, 0 );
11161116
sql = QString( "SELECT attname FROM pg_index,pg_attribute WHERE indexrelid=%1 AND indrelid=attrelid AND pg_attribute.attnum=any(pg_index.indkey)" ).arg( indrelid );
11171117

11181118
QgsDebugMsg( "Retrieving key columns: " + sql );

0 commit comments

Comments
 (0)
Please sign in to comment.