pub struct Cte {
pub name: String,
pub body: CteBody,
pub recursive: bool,
pub column_overrides: Vec<String>,
}Fields§
§name: String§body: CteBodyv7.37.43-T4.4 — body is either a SELECT (read-only CTE, the classical case) or a data-modifying statement (INSERT / UPDATE / DELETE … RETURNING …) per PG writable CTE semantics. The modifying body’s RETURNING projection becomes the materialised CTE table the outer query can reference; the modifying statement runs once before the outer query, within the same transaction.
recursive: boolv4.22: WITH RECURSIVE — set when the WITH clause had the
RECURSIVE keyword. Applies to every CTE in the clause per
PG semantics. A non-recursive body in a RECURSIVE WITH is
allowed; the engine just runs it once.
column_overrides: Vec<String>v4.22: optional WITH name(a, b, c) column-name list. When
non-empty, these override the body’s output column names
position-by-position; the engine errors out if the count
doesn’t match the body’s projection width.