postgis_geom_detect.diff

Jeremy Palmer, 2010-11-22 03:41 PM

Download (1.18 KB)

View differences:

src/providers/postgres/qgspostgresprovider.cpp (working copy)
3138 3138
                     "from " ).arg( quotedIdentifier( geometryColumn ) );
3139 3139
      if ( mUseEstimatedMetadata )
3140 3140
      {
3141
        sql += QString( "(select %1 from %2 where %1 is not null limit %3) as t" )
3141
        sql += QString( "(select %1 from %2 where %1 is not null" )
3142 3142
               .arg( quotedIdentifier( geometryColumn ) )
3143
               .arg( mQuery )
3144
               .arg( sGeomTypeSelectLimit );
3143
               .arg( mQuery );
3144
        if ( !sqlWhereClause.isEmpty() )
3145
          sql += " and " + sqlWhereClause;
3146
        sql += QString(" limit %1 ) as t").arg( sGeomTypeSelectLimit );
3145 3147
      }
3146 3148
      else
3147 3149
      {
3148 3150
        sql += mQuery;
3151
        if ( !sqlWhereClause.isEmpty() )
3152
          sql += " where " + sqlWhereClause;
3149 3153
      }
3150 3154

  
3151
      if ( !sqlWhereClause.isEmpty() )
3152
        sql += " where " + sqlWhereClause;
3153

  
3154 3155
      result = connectionRO->PQexec( sql );
3155 3156

  
3156 3157
      if ( PQntuples( result ) == 1 )