Header And Logo

PostgreSQL
| The world's most advanced open source database.

Data Structures | Typedefs | Functions

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

typedef struct PLyPlanObject PLyPlanObject

Function Documentation

bool is_PLyPlanObject ( PyObject *  ob  ) 

Definition at line 88 of file plpy_planobject.c.

References PLy_PlanType.

Referenced by PLy_spi_execute().

{
    return ob->ob_type == &PLy_PlanType;
}

void PLy_plan_init_type ( void   ) 

Definition at line 64 of file plpy_planobject.c.

References elog, ERROR, and PLy_PlanType.

Referenced by PLy_init_plpy().

{
    if (PyType_Ready(&PLy_PlanType) < 0)
        elog(ERROR, "could not initialize PLy_PlanType");
}

PyObject* PLy_plan_new ( void   ) 

Definition at line 71 of file plpy_planobject.c.

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

Referenced by PLy_spi_prepare().

{
    PLyPlanObject *ob;

    if ((ob = PyObject_New(PLyPlanObject, &PLy_PlanType)) == NULL)
        return NULL;

    ob->plan = NULL;
    ob->nargs = 0;
    ob->types = NULL;
    ob->values = NULL;
    ob->args = NULL;

    return (PyObject *) ob;
}