ProvSQL SQL API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
choose aggregate

Choose one value among many, used in particular to code a mutually exclusive choice as an aggregate. More...

Functions

ANYELEMENT provsql.choose_function (ANYELEMENT state, ANYELEMENT data)
 Transition function for the choose aggregate (keeps first non-NULL value).
VOID provsql.choose (ANYELEMENT)
 Aggregate that returns an arbitrary non-NULL value from a group.
VOID provsql.explode_table (TEXT _tbl, TEXT AGG_TOKEN)
 Explodes a table column containing aggregated provenance into multiple rows.

Detailed Description

Choose one value among many, used in particular to code a mutually exclusive choice as an aggregate.

Function Documentation

◆ choose()

VOID provsql.choose ( ANYELEMENT )

Aggregate that returns an arbitrary non-NULL value from a group.

Source code
provsql.sql line 10383

◆ choose_function()

ANYELEMENT provsql.choose_function ( ANYELEMENT state,
ANYELEMENT data )

Transition function for the choose aggregate (keeps first non-NULL value).

Source code
provsql.sql line 10370

◆ explode_table()

VOID provsql.explode_table ( TEXT _tbl,
TEXT AGG_TOKEN )

Explodes a table column containing aggregated provenance into multiple rows.

For each row in the input table, this function unnests the children of the specified aggregate token column and produces one output row per child. It reconstructs the corresponding value and provenance (provsql) for each resulting row.

The original table is replaced by the transformed table.

Parameters
_tblName of the table to transform.
AGG_TOKENName of the column containing the aggregate to explode.
Source code
provsql.sql line 10400