#include "access/tupdesc.h"
Go to the source code of this file.
Data Structures | |
struct | PLyResultObject |
Typedefs | |
typedef struct PLyResultObject | PLyResultObject |
Functions | |
void | PLy_result_init_type (void) |
PyObject * | PLy_result_new (void) |
typedef struct PLyResultObject PLyResultObject |
void PLy_result_init_type | ( | void | ) |
Definition at line 94 of file plpy_resultobject.c.
References elog, ERROR, and PLy_ResultType.
Referenced by PLy_init_plpy().
{ if (PyType_Ready(&PLy_ResultType) < 0) elog(ERROR, "could not initialize PLy_ResultType"); }
PyObject* PLy_result_new | ( | void | ) |
Definition at line 101 of file plpy_resultobject.c.
References PLyResultObject::nrows, NULL, PLy_ResultType, PLyResultObject::rows, PLyResultObject::status, and PLyResultObject::tupdesc.
Referenced by PLy_cursor_fetch(), and PLy_spi_execute_fetch_result().
{ PLyResultObject *ob; if ((ob = PyObject_New(PLyResultObject, &PLy_ResultType)) == NULL) return NULL; /* ob->tuples = NULL; */ Py_INCREF(Py_None); ob->status = Py_None; ob->nrows = PyInt_FromLong(-1); ob->rows = PyList_New(0); ob->tupdesc = NULL; return (PyObject *) ob; }