Revert "Uses tables ogr2ogr param to avoid heavy query on pg_class and friends"

This reverts commit b6e53f7326.
This commit is contained in:
Raul Ochoa 2015-06-16 16:58:22 +02:00
parent b122503f67
commit a297a14300
2 changed files with 0 additions and 10 deletions

View File

@ -286,8 +286,6 @@ function handleQuery(req, res) {
req.profiler.done('init');
}
var affectedTables;
// 1. Get database from redis via the username stored in the host header subdomain
// 2. Run the request through OAuth to get R/W user id if signed
// 3. Get the list of tables affected by the query
@ -406,7 +404,6 @@ function handleQuery(req, res) {
};
tableCache.set(sql_md5, tableCacheItem);
}
affectedTables = tables;
if ( !authenticated && tableCacheItem ) {
var affected_tables = tableCacheItem.affected_tables;
@ -479,7 +476,6 @@ function handleQuery(req, res) {
skipfields: skipfields,
sql: sql,
filename: filename,
affectedTables: affectedTables,
bufferedRows: global.settings.bufferedRows,
callback: params.callback,
abortChecker: checkAborted

View File

@ -141,18 +141,12 @@ OgrFormat.prototype.toOGR = function(options, out_format, out_filename, callback
var ogrsql = 'SELECT ' + columns.join(',') + ' FROM (' + sql + ') as _cartodbsqlapi';
var tables = 'fake';
if (options.affectedTables && options.affectedTables.length) {
tables = options.affectedTables.join(',');
}
var ogrargs = [
'-f', out_format,
'-lco', 'ENCODING=UTF-8',
'-lco', 'LINEFORMAT=CRLF',
out_filename,
"PG:host=" + dbhost + " port=" + dbport + " user=" + dbuser + " dbname=" + dbname + " password=" + dbpass,
'tables=' + tables,
'-sql', ogrsql
];