You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Commite717a9a changed the longstanding rule that prosrc is NOT NULLbecause when a SQL-language function is written in SQL-standard style,we don't currently have anything useful to put there. This seems a poordecision though, as it could easily have negative impacts on externalPLs (opening them to crashes they didn't use to have, for instance).SQL-function-related code can just as easily test "is prosqlbody notnull" as "is prosrc null", so there's no real gain there either.Hence, revert the NOT NULL marking removal and adjust related logic.For now, we just put an empty string into prosrc for SQL-standardfunctions. Maybe we'll have a better idea later, although thehistory of things like pg_attrdef.adsrc suggests that it's noteasy to maintain a string equivalent of a node tree.This also adds an assertion that queryDesc->sourceText != NULLto standard_ExecutorStart. We'd been silently relying on thatfor awhile, so let's make it less silent.Also fix some overlooked documentation and test cases.Discussion:https://postgr.es/m/2197698.1617984583@sss.pgh.pa.us