Skip to content

Commit

Permalink
Use Oid alias instead of unsigned int in PG provider
Browse files Browse the repository at this point in the history
for consistency only, no bytecode changes are expected
  • Loading branch information
elpaso committed Jun 13, 2019
1 parent ffe3c31 commit f820166
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 f820166

Please sign in to comment.