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 90 of file plpy_planobject.c.

References PLy_PlanType.

Referenced by PLy_spi_execute().

91 {
92  return ob->ob_type == &PLy_PlanType;
93 }
static PyTypeObject PLy_PlanType
void PLy_plan_init_type ( void  )

Definition at line 65 of file plpy_planobject.c.

References elog, ERROR, and PLy_PlanType.

Referenced by PLy_init_plpy().

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

Definition at line 72 of file plpy_planobject.c.

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

Referenced by PLy_spi_prepare().

73 {
74  PLyPlanObject *ob;
75 
76  if ((ob = PyObject_New(PLyPlanObject, &PLy_PlanType)) == NULL)
77  return NULL;
78 
79  ob->plan = NULL;
80  ob->nargs = 0;
81  ob->types = NULL;
82  ob->values = NULL;
83  ob->args = NULL;
84  ob->mcxt = NULL;
85 
86  return (PyObject *) ob;
87 }
PLyTypeInfo * args
static PyTypeObject PLy_PlanType
PyObject_HEAD SPIPlanPtr plan
MemoryContext mcxt
#define NULL
Definition: c.h:226