PostgreSQL Source Code  git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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

◆ PLyPlanObject

typedef struct PLyPlanObject PLyPlanObject

Function Documentation

◆ is_PLyPlanObject()

bool is_PLyPlanObject ( PyObject *  ob)

Definition at line 65 of file plpy_planobject.c.

66 {
67  return ob->ob_type == &PLy_PlanType;
68 }
static PyTypeObject PLy_PlanType

References PLy_PlanType.

Referenced by PLy_spi_execute().

◆ PLy_plan_init_type()

void PLy_plan_init_type ( void  )

Definition at line 40 of file plpy_planobject.c.

41 {
42  if (PyType_Ready(&PLy_PlanType) < 0)
43  elog(ERROR, "could not initialize PLy_PlanType");
44 }
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:225

References elog, ERROR, and PLy_PlanType.

Referenced by PLy_init_plpy().

◆ PLy_plan_new()

PyObject* PLy_plan_new ( void  )

Definition at line 47 of file plpy_planobject.c.

48 {
49  PLyPlanObject *ob;
50 
51  if ((ob = PyObject_New(PLyPlanObject, &PLy_PlanType)) == NULL)
52  return NULL;
53 
54  ob->plan = NULL;
55  ob->nargs = 0;
56  ob->types = NULL;
57  ob->values = NULL;
58  ob->args = NULL;
59  ob->mcxt = NULL;
60 
61  return (PyObject *) ob;
62 }
PyObject_HEAD SPIPlanPtr plan
MemoryContext mcxt
PLyObToDatum * args

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

Referenced by PLy_spi_prepare().