| 55 | } |
| 56 | |
| 57 | PyObject * |
| 58 | PLy_cursor(PyObject *self, PyObject *args) |
| 59 | { |
| 60 | char *query; |
| 61 | PyObject *plan; |
| 62 | PyObject *planargs = NULL; |
| 63 | |
| 64 | if (PyArg_ParseTuple(args, "s", &query)) |
| 65 | return PLy_cursor_query(query); |
| 66 | |
| 67 | PyErr_Clear(); |
| 68 | |
| 69 | if (PyArg_ParseTuple(args, "O|O", &plan, &planargs)) |
| 70 | return PLy_cursor_plan(plan, planargs); |
| 71 | |
| 72 | PLy_exception_set(PLy_exc_error, "plpy.cursor expected a query or a plan"); |
| 73 | return NULL; |
| 74 | } |
| 75 | |
| 76 | |
| 77 | static PyObject * |
nothing calls this directly
no test coverage detected