2011-12-18 14:14:16 -05:00
|
|
|
/*
|
|
|
|
|
* src/pl/plpython/plpy_subxactobject.h
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef PLPY_SUBXACTOBJECT
|
|
|
|
|
#define PLPY_SUBXACTOBJECT
|
|
|
|
|
|
2012-08-28 16:11:44 -04:00
|
|
|
#include "nodes/pg_list.h"
|
|
|
|
|
#include "utils/resowner.h"
|
|
|
|
|
|
2011-12-18 14:14:16 -05:00
|
|
|
/* a list of nested explicit subtransactions */
|
|
|
|
|
extern List *explicit_subtransactions;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct PLySubtransactionObject
|
|
|
|
|
{
|
|
|
|
|
PyObject_HEAD
|
|
|
|
|
bool started;
|
|
|
|
|
bool exited;
|
|
|
|
|
} PLySubtransactionObject;
|
|
|
|
|
|
|
|
|
|
/* explicit subtransaction data */
|
|
|
|
|
typedef struct PLySubtransactionData
|
|
|
|
|
{
|
|
|
|
|
MemoryContext oldcontext;
|
|
|
|
|
ResourceOwner oldowner;
|
|
|
|
|
} PLySubtransactionData;
|
|
|
|
|
|
|
|
|
|
extern void PLy_subtransaction_init_type(void);
|
2011-12-29 15:55:49 -05:00
|
|
|
extern PyObject *PLy_subtransaction_new(PyObject *self, PyObject *unused);
|
2011-12-18 14:14:16 -05:00
|
|
|
|
2012-06-10 15:20:04 -04:00
|
|
|
#endif /* PLPY_SUBXACTOBJECT */
|