Removes the call to set the search path as it should get the correct public user from redis

This commit is contained in:
Raul Ochoa 2014-07-04 12:57:20 +02:00
parent ca7b87d81a
commit 21d6924088

View File

@ -346,6 +346,8 @@ function handleQuery(req, res) {
Meta.getUserDBPass(cdbuser, this); Meta.getUserDBPass(cdbuser, this);
}, },
function queryExplain(err, data){ function queryExplain(err, data){
var self = this;
if (err) throw err; if (err) throw err;
if ( req.profiler ) req.profiler.done('getUserDBPass'); if ( req.profiler ) req.profiler.done('getUserDBPass');
checkAborted('queryExplain'); checkAborted('queryExplain');
@ -361,17 +363,6 @@ function handleQuery(req, res) {
} }
pg = new PSQL(dbopts); pg = new PSQL(dbopts);
if (user_id === null) {
var s = "SET search_path = " + cdbuser + ",cartodb, public";
pg.query(s, this);
} else {
return data;
}
},
function queryTables(err) {
if (err) throw err;
var self = this;
// get all the tables from Cache or SQL // get all the tables from Cache or SQL
tableCacheItem = tableCache.get(sql_md5); tableCacheItem = tableCache.get(sql_md5);
if (tableCacheItem) { if (tableCacheItem) {