Skip to content

Commit

Permalink
Merge pull request #30192 from elpaso/pg-oid
Browse files Browse the repository at this point in the history
Use Oid alias instead of unsigned int in PG provider
  • Loading branch information
elpaso authored Jun 13, 2019
2 parents 9984dc7 + f820166 commit 79d90a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresconn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ QString QgsPostgresResult::PQfname( int col )
return QString::fromUtf8( ::PQfname( mRes, col ) );
}

unsigned int QgsPostgresResult::PQftable( int col )
Oid QgsPostgresResult::PQftable( int col )
{
Q_ASSERT( mRes );
return ::PQftable( mRes, col );
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresconn.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class QgsPostgresResult

int PQnfields();
QString PQfname( int col );
unsigned int PQftable( int col );
Oid PQftable( int col );
Oid PQftype( int col );
int PQfmod( int col );
int PQftablecol( int col );
Expand Down
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ bool QgsPostgresProvider::loadFields()
if ( result.PQnfields() > 0 )
{
// Collect table oids
QSet<unsigned int> tableoids;
QSet<Oid> tableoids;
for ( int i = 0; i < result.PQnfields(); i++ )
{
Oid tableoid = result.PQftable( i );
Expand Down Expand Up @@ -837,7 +837,7 @@ bool QgsPostgresProvider::loadFields()
Oid fldtyp = result.PQftype( i );
int fldMod = result.PQfmod( i );
int fieldPrec = -1;
unsigned int tableoid = result.PQftable( i );
Oid tableoid = result.PQftable( i );
int attnum = result.PQftablecol( i );
Oid atttypid = attTypeIdMap[tableoid][attnum];

Expand Down

0 comments on commit 79d90a9

Please sign in to comment.