Merge pull request #426 from CartoDB/upgrade-cartodb-psql
Upgrade cartodb-psql to 0.10.0
This commit is contained in:
commit
61bb1ca155
5
NEWS.md
5
NEWS.md
@ -3,12 +3,15 @@
|
||||
## 1.47.1
|
||||
Released 2017-mm-dd
|
||||
|
||||
Announcements:
|
||||
* Upgrade cartodb-psql to 0.10.0.
|
||||
* Content edits to doc/version.md
|
||||
|
||||
## 1.47.0
|
||||
Released 2017-08-10
|
||||
|
||||
Announcements:
|
||||
- Now export and query APIs respond with `429 You are over the limits` when a query or export command overcomes the pre-configured user's timeout.
|
||||
* Now export and query APIs respond with `429 You are over the limits` when a query or export command overcomes the pre-configured user's timeout.
|
||||
|
||||
|
||||
## 1.46.1
|
||||
|
@ -137,7 +137,7 @@ QueryController.prototype.handleQuery = function (req, res) {
|
||||
|
||||
checkAborted('queryExplain');
|
||||
|
||||
var pg = new PSQL(authDbParams, {}, { destroyOnError: true });
|
||||
var pg = new PSQL(authDbParams);
|
||||
var skipCache = !!dbopts.authenticated;
|
||||
|
||||
self.queryTables.getAffectedTablesFromQuery(pg, sql, skipCache, function(err, result) {
|
||||
|
@ -80,7 +80,7 @@ OgrFormat.prototype.toOGR = function(options, out_format, out_filename, callback
|
||||
|
||||
function fetchColumns() {
|
||||
var colsql = 'SELECT * FROM (' + sql + ') as _cartodbsqlapi LIMIT 0';
|
||||
pg = new PSQL(dbopts, {}, { destroyOnError: true });
|
||||
pg = new PSQL(dbopts);
|
||||
pg.query(colsql, this);
|
||||
},
|
||||
// jshint maxcomplexity:9
|
||||
|
@ -119,7 +119,7 @@ PostgresFormat.prototype.sendResponse = function(opts, callback) {
|
||||
|
||||
this.start_time = Date.now();
|
||||
|
||||
this.client = new PSQL(opts.dbopts, {}, { destroyOnError: true });
|
||||
this.client = new PSQL(opts.dbopts);
|
||||
this.client.eventedQuery(sql, function(err, query, queryCanceller) {
|
||||
that.queryCanceller = queryCanceller;
|
||||
if (err) {
|
||||
|
@ -19,7 +19,7 @@ JobCanceller.prototype.cancel = function (job, callback) {
|
||||
};
|
||||
|
||||
function doCancel(job_id, userDatabaseMetadata, callback) {
|
||||
var pg = new PSQL(userDatabaseMetadata, {}, { destroyOnError: true });
|
||||
var pg = new PSQL(userDatabaseMetadata);
|
||||
|
||||
getQueryPID(pg, job_id, function (err, pid) {
|
||||
if (err) {
|
||||
|
@ -15,7 +15,7 @@ QueryRunner.prototype.run = function (job_id, sql, user, timeout, callback) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
var pg = new PSQL(userDatabaseMetadata, {}, { destroyOnError: true });
|
||||
var pg = new PSQL(userDatabaseMetadata);
|
||||
|
||||
pg.query('SET statement_timeout=' + timeout, function (err) {
|
||||
if(err) {
|
||||
|
2282
npm-shrinkwrap.json
generated
2282
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@
|
||||
"dependencies": {
|
||||
"bintrees": "1.0.1",
|
||||
"bunyan": "1.8.1",
|
||||
"cartodb-psql": "0.7.1",
|
||||
"cartodb-psql": "0.10.0",
|
||||
"cartodb-query-tables": "0.2.0",
|
||||
"cartodb-redis": "0.14.0",
|
||||
"debug": "2.2.0",
|
||||
|
@ -29,15 +29,6 @@ describe('system-queries', function() {
|
||||
],
|
||||
api_key_works: true,
|
||||
no_api_key_works: true
|
||||
},
|
||||
{
|
||||
desc: 'Set queries will FAIL for both api_key and no_api_key queries',
|
||||
queries: [
|
||||
' SET work_mem TO 80000',
|
||||
' set statement_timeout TO 400'
|
||||
],
|
||||
api_key_works: false,
|
||||
no_api_key_works: false
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -45,7 +45,7 @@ function runQueryHelper(job, callback) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
var pg = new PSQL(userDatabaseMetadata, {}, { destroyOnError: true });
|
||||
var pg = new PSQL(userDatabaseMetadata);
|
||||
|
||||
sql = '/* ' + job_id + ' */ ' + sql;
|
||||
|
||||
|
@ -55,7 +55,7 @@ function runQueryHelper(job, callback) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
var pg = new PSQL(userDatabaseMetadata, {}, { destroyOnError: true });
|
||||
var pg = new PSQL(userDatabaseMetadata);
|
||||
|
||||
sql = '/* ' + job_id + ' */ ' + sql;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user