* Dissect the list of options assembled in gram.y into function * attributes. */
| 915 | * attributes. |
| 916 | */ |
| 917 | static void |
| 918 | compute_function_attributes(ParseState *pstate, |
| 919 | bool is_procedure, |
| 920 | List *options, |
| 921 | List **as, |
| 922 | char **language, |
| 923 | Node **transform, |
| 924 | bool *windowfunc_p, |
| 925 | char *volatility_p, |
| 926 | bool *strict_p, |
| 927 | bool *security_definer, |
| 928 | bool *leakproof_p, |
| 929 | ArrayType **proconfig, |
| 930 | float4 *procost, |
| 931 | float4 *prorows, |
| 932 | Oid *prosupport, |
| 933 | char *parallel_p, |
| 934 | List **describeQualName_p, |
| 935 | char *data_access_p, |
| 936 | char *exec_location_p) |
| 937 | { |
| 938 | ListCell *option; |
| 939 | DefElem *as_item = NULL; |
| 940 | DefElem *language_item = NULL; |
| 941 | DefElem *transform_item = NULL; |
| 942 | DefElem *windowfunc_item = NULL; |
| 943 | DefElem *volatility_item = NULL; |
| 944 | DefElem *strict_item = NULL; |
| 945 | DefElem *security_item = NULL; |
| 946 | DefElem *leakproof_item = NULL; |
| 947 | List *set_items = NIL; |
| 948 | DefElem *cost_item = NULL; |
| 949 | DefElem *rows_item = NULL; |
| 950 | DefElem *support_item = NULL; |
| 951 | DefElem *parallel_item = NULL; |
| 952 | DefElem *describe_item = NULL; |
| 953 | DefElem *data_access_item = NULL; |
| 954 | DefElem *exec_location_item = NULL; |
| 955 | |
| 956 | foreach(option, options) |
| 957 | { |
| 958 | DefElem *defel = (DefElem *) lfirst(option); |
| 959 | |
| 960 | if (strcmp(defel->defname, "as") == 0) |
| 961 | { |
| 962 | if (as_item) |
| 963 | ereport(ERROR, |
| 964 | (errcode(ERRCODE_SYNTAX_ERROR), |
| 965 | errmsg("conflicting or redundant options"), |
| 966 | parser_errposition(pstate, defel->location))); |
| 967 | as_item = defel; |
| 968 | } |
| 969 | else if (strcmp(defel->defname, "language") == 0) |
| 970 | { |
| 971 | if (language_item) |
| 972 | ereport(ERROR, |
| 973 | (errcode(ERRCODE_SYNTAX_ERROR), |
| 974 | errmsg("conflicting or redundant options"), |
no test coverage detected