PostgreSQL Source Code git master
Loading...
Searching...
No Matches
plpy_resultobject.h File Reference
#include "access/tupdesc.h"
#include "plpython.h"
Include dependency graph for plpy_resultobject.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PLyResultObject
 

Typedefs

typedef struct PLyResultObject PLyResultObject
 

Functions

void PLy_result_init_type (void)
 
PyObjectPLy_result_new (void)
 

Typedef Documentation

◆ PLyResultObject

Function Documentation

◆ PLy_result_init_type()

void PLy_result_init_type ( void  )
extern

Definition at line 81 of file plpy_resultobject.c.

82{
84 if (!PLy_ResultType)
85 elog(ERROR, "could not initialize PLy_ResultType");
86}
#define ERROR
Definition elog.h:39
#define elog(elevel,...)
Definition elog.h:226
static PyType_Spec PLyResult_spec
static PyTypeObject * PLy_ResultType
static int fb(int x)

References elog, ERROR, fb(), PLy_ResultType, and PLyResult_spec.

Referenced by PyInit_plpy().

◆ PLy_result_new()

PyObject * PLy_result_new ( void  )
extern

Definition at line 89 of file plpy_resultobject.c.

90{
92
94 return NULL;
95#if PY_VERSION_HEX < 0x03080000
96 /* Workaround for Python issue 35810; no longer necessary in Python 3.8 */
98#endif
99
100 /* ob->tuples = NULL; */
101
103 ob->status = Py_None;
104 ob->nrows = PyLong_FromLong(-1);
105 ob->rows = PyList_New(0);
106 ob->tupdesc = NULL;
107 if (!ob->rows)
108 {
109 Py_DECREF(ob);
110 return NULL;
111 }
112
113 return (PyObject *) ob;
114}

References fb(), and PLy_ResultType.

Referenced by PLy_cursor_fetch(), and PLy_spi_execute_fetch_result().