2011-12-18 20:14:16 +01:00
|
|
|
/*
|
|
|
|
* src/pl/plpython/plpy_subxactobject.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PLPY_SUBXACTOBJECT
|
|
|
|
#define PLPY_SUBXACTOBJECT
|
|
|
|
|
2012-08-28 22:11:44 +02:00
|
|
|
#include "nodes/pg_list.h"
|
2019-05-31 17:45:33 +02:00
|
|
|
#include "plpython.h"
|
2019-11-25 03:38:57 +01:00
|
|
|
#include "utils/resowner.h"
|
2019-05-31 17:45:33 +02:00
|
|
|
|
2011-12-18 20:14:16 +01: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 21:55:49 +01:00
|
|
|
extern PyObject *PLy_subtransaction_new(PyObject *self, PyObject *unused);
|
2011-12-18 20:14:16 +01:00
|
|
|
|
|
|
|
#endif /* PLPY_SUBXACTOBJECT */
|