MCPcopy Create free account
hub / github.com/apache/cloudberry / update_proconfig_value

Function update_proconfig_value

src/backend/commands/functioncmds.c:848–871  ·  view source on GitHub ↗

* Update a proconfig value according to a list of VariableSetStmt items. * * The input and result may be NULL to signify a null entry. */

Source from the content-addressed store, hash-verified

846 * The input and result may be NULL to signify a null entry.
847 */
848static ArrayType *
849update_proconfig_value(ArrayType *a, List *set_items)
850{
851 ListCell *l;
852
853 foreach(l, set_items)
854 {
855 VariableSetStmt *sstmt = lfirst_node(VariableSetStmt, l);
856
857 if (sstmt->kind == VAR_RESET_ALL)
858 a = NULL;
859 else
860 {
861 char *valuestr = ExtractSetVariableArgs(sstmt);
862
863 if (valuestr)
864 a = GUCArrayAdd(a, sstmt->name, valuestr);
865 else /* RESET */
866 a = GUCArrayDelete(a, sstmt->name);
867 }
868 }
869
870 return a;
871}
872
873static Oid
874interpret_func_support(DefElem *defel)

Callers 2

AlterFunctionFunction · 0.85

Calls 4

ExtractSetVariableArgsFunction · 0.85
GUCArrayAddFunction · 0.85
GUCArrayDeleteFunction · 0.85
foreachFunction · 0.50

Tested by

no test coverage detected