pub fn coalesced_audience_column(qualifier: &str, param: usize) -> StringExpand description
COALESCE(<qualifier>.audience, $<param>) – a row’s own stamp, or the deployment’s
MICROMEGAS_DEFAULT_AUDIENCE for a row written before this stage (a NULL column). qualifier
is inlined as SQL text, so it must be a trusted table name or alias, never user input; the
default stays a bind parameter, since it is operator-supplied config.
This is the shared shape of every site that reads an audience out of Postgres off a physical
column – the blocks view’s data_sql, metadata::find_process, and audience_guard’s
owner_query_sql. param is the 1-based placeholder index the caller will bind the default
to.