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.
This commit is contained in:
Nicholas Bowman 2022-01-07 01:32:46 -08:00 committed by GitHub
parent 5b02e8a666
commit 20574c130a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}