Teach planner to expand sufficiently simple SQL-language functions
('SELECT expression') inline, like macros, during the constant-folding phase of planning. The actual expansion is not difficult, but checking that we're not changing the semantics of the call turns out to be more subtle than one might think; in particular must pay attention to permissions issues, strictness, and volatility.
Showing
Please register or sign in to comment