Skip to content
Permalink
Browse files

Merge feb0c8b into cherry-pick-backport-9427-on-release-3_6-9ef54f37-…

…8fea-4da4-9180-e8aad35527fc
  • Loading branch information
backporting committed Mar 10, 2019
2 parents 124a163 + feb0c8b commit 9bac4cf36428d505aa970c831502a5599a10c1bb
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/postgres/qgspostgresprovider.cpp
@@ -3190,7 +3190,7 @@ long QgsPostgresProvider::featureCount() const
// - but make huge dataset usable.
if ( !mIsQuery && mUseEstimatedMetadata )
{
sql = QStringLiteral( "SELECT reltuples::int FROM pg_catalog.pg_class WHERE oid=regclass(%1)::oid" ).arg( quotedValue( mQuery ) );
sql = QStringLiteral( "SELECT reltuples::bigint FROM pg_catalog.pg_class WHERE oid=regclass(%1)::oid" ).arg( quotedValue( mQuery ) );
}
else
{
@@ -3249,7 +3249,7 @@ QgsRectangle QgsPostgresProvider::extent() const
{
if ( result.PQgetvalue( 0, 0 ).toInt() > 0 )
{
sql = QStringLiteral( "SELECT reltuples::int FROM pg_catalog.pg_class WHERE oid=regclass(%1)::oid" ).arg( quotedValue( mQuery ) );
sql = QStringLiteral( "SELECT reltuples::bigint FROM pg_catalog.pg_class WHERE oid=regclass(%1)::oid" ).arg( quotedValue( mQuery ) );
result = connectionRO()->PQexec( sql );
if ( result.PQresultStatus() == PGRES_TUPLES_OK
&& result.PQntuples() == 1

0 comments on commit 9bac4cf

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