Header And Logo

| The world's most advanced open source database.

Data Structures | Typedefs | Functions

plpy_cursorobject.h File Reference

#include "plpy_typeio.h"
Include dependency graph for plpy_cursorobject.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PLyCursorObject


typedef struct PLyCursorObject PLyCursorObject


void PLy_cursor_init_type (void)
PyObject * PLy_cursor (PyObject *self, PyObject *args)

Typedef Documentation

Function Documentation

PyObject* PLy_cursor ( PyObject *  self,
PyObject *  args 

Definition at line 84 of file plpy_cursorobject.c.

References PLy_cursor_plan(), PLy_cursor_query(), PLy_exc_error, and PLy_exception_set().

    char       *query;
    PyObject   *plan;
    PyObject   *planargs = NULL;

    if (PyArg_ParseTuple(args, "s", &query))
        return PLy_cursor_query(query);


    if (PyArg_ParseTuple(args, "O|O", &plan, &planargs))
        return PLy_cursor_plan(plan, planargs);

    PLy_exception_set(PLy_exc_error, "plpy.cursor expected a query or a plan");
    return NULL;

void PLy_cursor_init_type ( void   ) 

Definition at line 77 of file plpy_cursorobject.c.

References elog, ERROR, and PLy_CursorType.

Referenced by PLy_init_plpy().

    if (PyType_Ready(&PLy_CursorType) < 0)
        elog(ERROR, "could not initialize PLy_CursorType");