* Construct array of query parameter values in text format. */
| 4893 | * Construct array of query parameter values in text format. |
| 4894 | */ |
| 4895 | static void |
| 4896 | process_query_params(ExprContext *econtext, |
| 4897 | FmgrInfo *param_flinfo, |
| 4898 | List *param_exprs, |
| 4899 | const char **param_values) |
| 4900 | { |
| 4901 | int nestlevel; |
| 4902 | int i; |
| 4903 | ListCell *lc; |
| 4904 | |
| 4905 | nestlevel = set_transmission_modes(); |
| 4906 | |
| 4907 | i = 0; |
| 4908 | foreach(lc, param_exprs) |
| 4909 | { |
| 4910 | ExprState *expr_state = (ExprState *) lfirst(lc); |
| 4911 | Datum expr_value; |
| 4912 | bool isNull; |
| 4913 | |
| 4914 | /* Evaluate the parameter expression */ |
| 4915 | expr_value = ExecEvalExpr(expr_state, econtext, &isNull); |
| 4916 | |
| 4917 | /* |
| 4918 | * Get string representation of each parameter value by invoking |
| 4919 | * type-specific output function, unless the value is null. |
| 4920 | */ |
| 4921 | if (isNull) |
| 4922 | param_values[i] = NULL; |
| 4923 | else |
| 4924 | param_values[i] = OutputFunctionCall(¶m_flinfo[i], expr_value); |
| 4925 | |
| 4926 | i++; |
| 4927 | } |
| 4928 | |
| 4929 | reset_transmission_modes(nestlevel); |
| 4930 | } |
| 4931 | |
| 4932 | /* |
| 4933 | * postgresAnalyzeForeignTable |
no test coverage detected