From 9d022766eefb71b36b255a0cc12f414cf06b5384 Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Tue, 14 Aug 2018 15:45:55 +0200 Subject: [PATCH] add postgres version to datasource config --- public/app/plugins/datasource/postgres/module.ts | 8 ++++++++ .../plugins/datasource/postgres/partials/config.html | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/public/app/plugins/datasource/postgres/module.ts b/public/app/plugins/datasource/postgres/module.ts index a24971fa1a1..b798155e255 100644 --- a/public/app/plugins/datasource/postgres/module.ts +++ b/public/app/plugins/datasource/postgres/module.ts @@ -10,6 +10,14 @@ class PostgresConfigCtrl { constructor($scope) { this.current.jsonData.sslmode = this.current.jsonData.sslmode || 'verify-full'; } + + // the value portion is derived from postgres server_version_num/100 + postgresVersions = [ + { name: '9.3.x', value: 903 }, + { name: '9.4.x', value: 904 }, + { name: '9.5.x', value: 905 }, + { name: '9.6.x', value: 906 }, + ]; } const defaultQuery = `SELECT diff --git a/public/app/plugins/datasource/postgres/partials/config.html b/public/app/plugins/datasource/postgres/partials/config.html index a1783c09dc4..40b0f63d254 100644 --- a/public/app/plugins/datasource/postgres/partials/config.html +++ b/public/app/plugins/datasource/postgres/partials/config.html @@ -41,6 +41,17 @@

PostgreSQL details

+
+ + Version + + This option controls what functions are available in the PostgreSQL query builder. + + + + + +