Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
qgspostgresprovider.cpp: use classic initialization
  • Loading branch information
rouault authored and nyalldawson committed Oct 11, 2020
1 parent 5e4707f commit e4fa6cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -1213,16 +1213,15 @@ bool QgsPostgresProvider::loadFields()
&& defValMap[tableoid][attnum].isEmpty() )
{
const QString seqName { mTableName + '_' + fieldName + QStringLiteral( "_seq" ) };
const QString seqSql { QStringLiteral( "SELECT c.oid "
const QString seqSql = QStringLiteral( "SELECT c.oid "
" FROM pg_class c "
" LEFT JOIN pg_namespace n "
" ON ( n.oid = c.relnamespace ) "
" WHERE c.relkind = 'S' "
" AND c.relname = %1 "
" AND n.nspname = %2" )
.arg( quotedValue( seqName ) )
.arg( quotedValue( mSchemaName ) )
};
.arg( quotedValue( mSchemaName ) );
QgsPostgresResult seqResult( connectionRO()->PQexec( seqSql ) );
if ( seqResult.PQntuples() == 1 )
{
Expand Down

0 comments on commit e4fa6cb

Please sign in to comment.