Module mz_sql::plan::side_effecting_func

source ·
Expand description

Support for side-effecting functions.

In PostgreSQL, these functions can appear anywhere in a query:

SELECT 1 WHERE pg_cancel_backend(1234)

In Materialize, our compute layer cannot execute functions with side effects. So we sniff out the common form of calls to side-effecting functions, i.e. at the top level of a SELECT

SELECT side_effecting_function(...)

where all arguments are literals or bound parameters, and plan them specially as a Plan::SideEffectingFunc. This gets us compatibility with PostgreSQL for most real-world use cases, without causing stress for the compute layer (optimizer, dataflow execution, etc.), as we can apply all the side effects entirely in the adapter layer.

Structs§

Enums§

Constants§

Statics§

Functions§