* Hook to run a query with commutative writes. * In single node all writes are commutative, so it just calls SPI directly with the args specified. */
| 128 | * In single node all writes are commutative, so it just calls SPI directly with the args specified. |
| 129 | */ |
| 130 | Datum |
| 131 | RunQueryWithCommutativeWrites(const char *query, int nargs, Oid *argTypes, |
| 132 | Datum *argValues, char *argNulls, |
| 133 | int expectedSPIOK, bool *isNull) |
| 134 | { |
| 135 | if (run_query_with_commutative_writes_hook != NULL) |
| 136 | { |
| 137 | return run_query_with_commutative_writes_hook(query, nargs, argTypes, argValues, |
| 138 | argNulls, expectedSPIOK, isNull); |
| 139 | } |
| 140 | |
| 141 | bool readOnly = false; |
| 142 | if (nargs > 0) |
| 143 | { |
| 144 | return ExtensionExecuteQueryWithArgsViaSPI(query, nargs, argTypes, argValues, |
| 145 | argNulls, readOnly, expectedSPIOK, |
| 146 | isNull); |
| 147 | } |
| 148 | |
| 149 | return ExtensionExecuteQueryViaSPI(query, readOnly, expectedSPIOK, isNull); |
| 150 | } |
| 151 | |
| 152 | |
| 153 | /* |
no test coverage detected