Header And Logo

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

plpy_spi.h

Go to the documentation of this file.
00001 /*
00002  * src/pl/plpython/plpy_spi.h
00003  */
00004 
00005 #ifndef PLPY_SPI_H
00006 #define PLPY_SPI_H
00007 
00008 #include "utils/palloc.h"
00009 #include "utils/resowner.h"
00010 
00011 extern PyObject *PLy_spi_prepare(PyObject *self, PyObject *args);
00012 extern PyObject *PLy_spi_execute(PyObject *self, PyObject *args);
00013 
00014 typedef struct PLyExceptionEntry
00015 {
00016     int         sqlstate;       /* hash key, must be first */
00017     PyObject   *exc;            /* corresponding exception */
00018 } PLyExceptionEntry;
00019 
00020 /* handling of SPI operations inside subtransactions */
00021 extern void PLy_spi_subtransaction_begin(MemoryContext oldcontext, ResourceOwner oldowner);
00022 extern void PLy_spi_subtransaction_commit(MemoryContext oldcontext, ResourceOwner oldowner);
00023 extern void PLy_spi_subtransaction_abort(MemoryContext oldcontext, ResourceOwner oldowner);
00024 
00025 #endif   /* PLPY_SPI_H */