powa-team / powa-web

PoWA user interface
http://powa.readthedocs.io/
73 stars 30 forks source link

Handle queries with const in the SELECT part #14

Open rjuju opened 8 years ago

rjuju commented 8 years ago

a query like

SELECT round(i, 2) FROM generate_series(1,10) i

will result in this normalized query:

SELECT round(i, ?) FROM generate_series(?,?)i;

pg_qualstats doesn't track anything for the round(i, ?) part, leading to errors when trying to denormalize this query.

A fallback to the non normalized version (pg_qualstats.example_query(oid)) if available shoud be done.

If no fallback is possible, error shoud be handled (this is at least not the case in the wizard index check part).