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
Create the infrastructure for planner support functions.
Rename/repurpose pg_proc.protransform as "prosupport". The idea isstill that it names an internal function that provides knowledge tothe planner about the behavior of the function it's attached to;but redesign the API specification so that it's not limited to doingjust one thing, but can support an extensible set of requests.The original purpose of simplifying a function call is handled bythe first request type to be invented, SupportRequestSimplify.Adjust all the existing transform functions to handle this API,and rename them fron "xxx_transform" to "xxx_support" to reflectthe potential generalization of what they do. (Since we neverpreviously provided any way for extensions to add transform functions,this change doesn't create an API break for them.)Also add DDL and pg_dump support for attaching a support function to auser-defined function. Unfortunately, DDL access has to be restrictedto superusers, at least for now; but seeing that support functionswill pretty much have to be written in C, that limitation is justtheoretical. (This support is untested in this patch, but a follow-onpatch will add cases that exercise it.)Discussion:https://postgr.es/m/15193.1548028093@sss.pgh.pa.us
| SUPPORT <replaceable class="parameter">support_function</replaceable>
36
37
| SET <replaceable class="parameter">configuration_parameter</replaceable> { TO <replaceable class="parameter">value</replaceable> | = <replaceable class="parameter">value</replaceable> | FROM CURRENT }
37
38
| AS '<replaceable class="parameter">definition</replaceable>'
38
39
| AS '<replaceable class="parameter">obj_file</replaceable>', '<replaceable class="parameter">link_symbol</replaceable>'
@@ -477,6 +478,19 @@ CREATE [ OR REPLACE ] FUNCTION