浏览代码

Merge pull request #13427 from svenklemm/postgres-suggest-null-fix

filter NULL values in column value suggestion query
Marcus Efraimsson 7 年之前
父节点
当前提交
869e36995a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      public/app/plugins/datasource/postgres/meta_query.ts

+ 1 - 0
public/app/plugins/datasource/postgres/meta_query.ts

@@ -144,6 +144,7 @@ table_schema IN (
     let query = 'SELECT DISTINCT quote_literal(' + column + ')';
     query += ' FROM ' + this.target.table;
     query += ' WHERE $__timeFilter(' + this.target.timeColumn + ')';
+    query += ' AND ' + column + ' IS NOT NULL';
     query += ' ORDER BY 1 LIMIT 100';
     return query;
   }