Skip to content
Permalink
Browse files

postgres provider: also apply filterWhereClause to feature iterators (f…

…ixes #12499 & #12500)
  • Loading branch information
jef-n committed Apr 2, 2015
1 parent e16ebfa commit 97572244dc699c6d5480f736e38d9246496cef20
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/providers/postgres/qgspostgresfeatureiterator.cpp
@@ -569,7 +569,6 @@ void QgsPostgresFeatureIterator::getFeatureAttribute( int idx, QgsPostgresResult
QgsPostgresFeatureSource::QgsPostgresFeatureSource( const QgsPostgresProvider* p )
: mConnInfo( p->mUri.connectionInfo() )
, mGeometryColumn( p->mGeometryColumn )
, mSqlWhereClause( p->mSqlWhereClause )
, mFields( p->mAttributeFields )
, mSpatialColType( p->mSpatialColType )
, mRequestedSrid( p->mRequestedSrid )
@@ -582,6 +581,11 @@ QgsPostgresFeatureSource::QgsPostgresFeatureSource( const QgsPostgresProvider* p
, mQuery( p->mQuery )
, mShared( p->mShared )
{
mSqlWhereClause = p->filterWhereClause();

if ( mSqlWhereClause.startsWith( " WHERE " ) )
mSqlWhereClause = mSqlWhereClause.mid( 7 );

if ( p->mTransaction )
{
mTransactionConnection = p->mTransaction->connection();

0 comments on commit 9757224

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