PostgreSQL Source Code  git master
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 66 of file plpy_planobject.c.

67 {
68  return ob->ob_type == &PLy_PlanType;
69 }
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 41 of file plpy_planobject.c.

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

References elog, ERROR, and PLy_PlanType.

Referenced by PLy_init_plpy().

◆ PLy_plan_new()

PyObject* PLy_plan_new ( void  )

Definition at line 48 of file plpy_planobject.c.

49 {
50  PLyPlanObject *ob;
51 
52  if ((ob = PyObject_New(PLyPlanObject, &PLy_PlanType)) == NULL)
53  return NULL;
54 
55  ob->plan = NULL;
56  ob->nargs = 0;
57  ob->types = NULL;
58  ob->values = NULL;
59  ob->args = NULL;
60  ob->mcxt = NULL;
61 
62  return (PyObject *) ob;
63 }
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().