Skip to main content

figure_column_name

Function figure_column_name 

Source
pub fn figure_column_name(expr: &Expr) -> Option<String>
Expand description

v7.39 (round 505) — the column name PG18 gives a projected expression that carries no AS alias. None means ?column?.

SPG used to print the parsed expression back out, which matched neither oracle and made name-keyed row access miss on both wires:

queryPG18SPG (before)
upper(s)upperupper(s)
a+b?column?(a + b)
'lit'?column?'lit'
CASE …caseCASE WHEN (a = 1) THEN …

Every rule below is one of those measurements, taken with \gdesc against PG18: a call is named for its function, a cast recurses into its argument and falls back to the type, a scalar subquery takes the name of the column it selects, and operators have no name at all.