autodetect timescaledb when version >= 9.6

This commit is contained in:
Sven Klemm
2018-08-15 10:41:06 +02:00
parent 2d12801186
commit a2f4441f9d
2 changed files with 19 additions and 8 deletions

View File

@ -128,6 +128,10 @@ export class PostgresDatasource {
return this.metricFindQuery("SELECT current_setting('server_version_num')::int/100", {});
}
getTimescaleDBVersion() {
return this.metricFindQuery("SELECT extversion FROM pg_extension WHERE extname = 'timescaledb'", {});
}
testDatasource() {
return this.metricFindQuery('SELECT 1', {})
.then(res => {