diff --git a/lib/cartodb/backends/cluster.js b/lib/cartodb/backends/cluster.js index ab663997..87c67539 100644 --- a/lib/cartodb/backends/cluster.js +++ b/lib/cartodb/backends/cluster.js @@ -127,7 +127,7 @@ function getClusterFeatures (pg, zoom, clusterId, columns, query, resolution, ag } , true); // use read-only transaction } -const schemaQuery = ctx => `SELECT * FROM (${ctx.query}) __cdb_schema LIMIT 0`; +const schemaQuery = ctx => `SELECT * FROM (${ctx.query}) __cdb_cluster_schema LIMIT 0`; const clusterFeaturesQuery = ctx => ` WITH _cdb_params AS ( diff --git a/lib/cartodb/models/aggregation/aggregation-mapconfig.js b/lib/cartodb/models/aggregation/aggregation-mapconfig.js index 34b01859..74099f1e 100644 --- a/lib/cartodb/models/aggregation/aggregation-mapconfig.js +++ b/lib/cartodb/models/aggregation/aggregation-mapconfig.js @@ -201,7 +201,7 @@ module.exports = class AggregationMapConfig extends MapConfig { getLayerColumns (index, skipGeoms, callback) { const geomColumns = ['the_geom', 'the_geom_webmercator']; - const limitedQuery = ctx => `SELECT * FROM (${ctx.query}) __cdb_schema LIMIT 0`; + const limitedQuery = ctx => `SELECT * FROM (${ctx.query}) __cdb_aggregation_schema LIMIT 0`; const layer = this.getLayer(index); this.pgConnection.getConnection(this.user, (err, connection) => {