Skip to content
Permalink
Browse files

qgspostgresprovider.cpp: use classic initialization

  • Loading branch information
rouault authored and nyalldawson committed Oct 11, 2020
1 parent 5e4707f commit e4fa6cbc82f8aa7de8db32fb6e24f25c7f8ef966
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/providers/postgres/qgspostgresprovider.cpp
@@ -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 )
{

0 comments on commit e4fa6cb

Please sign in to comment.
You can’t perform that action at this time.