PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
plpy_planobject.h File Reference
#include "executor/spi.h"
#include "plpy_typeio.h"
Include dependency graph for plpy_planobject.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PLyPlanObject
 

Typedefs

typedef struct PLyPlanObject PLyPlanObject
 

Functions

void PLy_plan_init_type (void)
 
PyObject * PLy_plan_new (void)
 
bool is_PLyPlanObject (PyObject *ob)
 

Typedef Documentation

Function Documentation

bool is_PLyPlanObject ( PyObject *  ob)

Definition at line 96 of file plpy_planobject.c.

References PLy_PlanType.

Referenced by PLy_spi_execute().

97 {
98  return ob->ob_type == &PLy_PlanType;
99 }
static PyTypeObject PLy_PlanType
void PLy_plan_init_type ( void  )

Definition at line 71 of file plpy_planobject.c.

References elog, ERROR, and PLy_PlanType.

Referenced by PLy_init_plpy().

72 {
73  if (PyType_Ready(&PLy_PlanType) < 0)
74  elog(ERROR, "could not initialize PLy_PlanType");
75 }
#define ERROR
Definition: elog.h:43
static PyTypeObject PLy_PlanType
#define elog
Definition: elog.h:219
PyObject* PLy_plan_new ( void  )

Definition at line 78 of file plpy_planobject.c.

References PLyPlanObject::args, PLyPlanObject::mcxt, PLyPlanObject::nargs, PLyPlanObject::plan, PLy_PlanType, PLyPlanObject::types, and PLyPlanObject::values.

Referenced by PLy_spi_prepare().

79 {
80  PLyPlanObject *ob;
81 
82  if ((ob = PyObject_New(PLyPlanObject, &PLy_PlanType)) == NULL)
83  return NULL;
84 
85  ob->plan = NULL;
86  ob->nargs = 0;
87  ob->types = NULL;
88  ob->values = NULL;
89  ob->args = NULL;
90  ob->mcxt = NULL;
91 
92  return (PyObject *) ob;
93 }
PLyTypeInfo * args
static PyTypeObject PLy_PlanType
PyObject_HEAD SPIPlanPtr plan
MemoryContext mcxt