PostgreSQL: include numeric column type in Query Builder metaquery (#43445)

* Plugins: Change the PostgreSQL plugin to include more column types in Query Builder metaquery

Originally, the metaquery used in the PostgreSQL plugin to populate the
column dropdown menu in the Query Builder UI only included integer- and real-typed
columns. This change expands the list of acceptable types for plotting to
include numeric columns, boolean columns, and textual columns, as all are
types that could feasibly be desired to plot in a panel.

* Update types tracked in meta query builder

Removed the `boolean` and `text` types, but retained addition of `numeric` type as part of time series query builder.
pull/43058/head^2
Nicholas Bowman 3 years ago committed by GitHub
parent 5b02e8a666
commit 20574c130a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      public/app/plugins/datasource/postgres/meta_query.ts

@ -127,7 +127,7 @@ table_schema IN (
break;
}
case 'value': {
query += " AND data_type IN ('bigint','integer','double precision','real')";
query += " AND data_type IN ('bigint','integer','double precision','real','numeric')";
query += ' AND column_name <> ' + this.quoteIdentAsLiteral(this.target.timeColumn);
break;
}

Loading…
Cancel
Save