* Update a proconfig value according to a list of VariableSetStmt items. * * The input and result may be NULL to signify a null entry. */
| 846 | * The input and result may be NULL to signify a null entry. |
| 847 | */ |
| 848 | static ArrayType * |
| 849 | update_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 | |
| 873 | static Oid |
| 874 | interpret_func_support(DefElem *defel) |
no test coverage detected