![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Whether q reads the value of an aggregate of one of its subqueries as data: a GROUP BY key, or a DISTINCT column.
More...

Public Attributes | |
| const constants_t * | constants |
| Query * | q |
| bool | found |
Whether q reads the value of an aggregate of one of its subqueries as data: a GROUP BY key, or a DISTINCT column.
The value of an aggregate is not one value of the database but one per possible world, so grouping rows by it, or deduplicating on it, is no operation on the data as it is: it is the explosion of the aggregate into one row per value it takes (rewrite_explode_agg_value). Recognised before anything is processed, on the aggregate call itself: a bare Aggref of a tracked subquery whose result the level above groups by.
Only the first such column is reported: the rewriting re-enters process_query, which finds the next one if there is one.
| constants | Extension OID cache. |
| q | Query to inspect. |
| rteid | Out: varno of the subquery owning the aggregate. |
| attno | Out: attno of the aggregate column in it. |
| value_type | Out: the type of the values of that aggregate. |
Context for reads_subquery_aggregate_walker.
| const constants_t* subagg_read_ctx::constants |