{#- Redshift: capture a single cursor result from a procedure call.
    Wraps the CALL in a BEGIN/END block with optional DECLARE for scalar
    OUT variables, then FETCHes one cursor.
    Invoked once per output.table. -#}
BEGIN
{% if pre_execute %}
DECLARE
{{ pre_execute }}
{% endif %}
{{ run }};
FETCH ALL FROM {{ table }};
END;
