* Get the value to assign for a VariableSetStmt, or NULL if it's RESET. * The result is palloc'd. * * This is exported for use by actions such as ALTER ROLE SET. */
| 9206 | * This is exported for use by actions such as ALTER ROLE SET. |
| 9207 | */ |
| 9208 | char * |
| 9209 | ExtractSetVariableArgs(VariableSetStmt *stmt) |
| 9210 | { |
| 9211 | switch (stmt->kind) |
| 9212 | { |
| 9213 | case VAR_SET_VALUE: |
| 9214 | return flatten_set_variable_args(stmt->name, stmt->args); |
| 9215 | case VAR_SET_CURRENT: |
| 9216 | return GetConfigOptionByName(stmt->name, NULL, false); |
| 9217 | default: |
| 9218 | return NULL; |
| 9219 | } |
| 9220 | } |
| 9221 | |
| 9222 | /* |
| 9223 | * SetPGVariable - SET command exported as an easily-C-callable function. |
no test coverage detected