diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2011-12-18 21:14:16 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2011-12-18 21:24:00 +0200 |
commit | 147c2482542868d1f9dcf7d2ecfeac58d845335c (patch) | |
tree | 11617370d58bfc7ff6cca2b5b78212dd804a1147 /src/pl/plpython/plpy_subxactobject.h | |
parent | 59e242a4969d2efa6ce68dc7aab3cbd8cf975b08 (diff) | |
download | postgresql-147c2482542868d1f9dcf7d2ecfeac58d845335c.tar.gz postgresql-147c2482542868d1f9dcf7d2ecfeac58d845335c.zip |
Split plpython.c into smaller pieces
This moves the code around from one huge file into hopefully logical
and more manageable modules. For the most part, the code itself was
not touched, except: PLy_function_handler and PLy_trigger_handler were
renamed to PLy_exec_function and PLy_exec_trigger, because they were
not actually handlers in the PL handler sense, and it makes the naming
more similar to the way PL/pgSQL is organized. The initialization of
the procedure caches was separated into a new function
init_procedure_caches to keep the hash tables private to
plpy_procedures.c.
Jan UrbaĆski and Peter Eisentraut
Diffstat (limited to 'src/pl/plpython/plpy_subxactobject.h')
-rw-r--r-- | src/pl/plpython/plpy_subxactobject.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/pl/plpython/plpy_subxactobject.h b/src/pl/plpython/plpy_subxactobject.h new file mode 100644 index 00000000000..0db8aa9f3fa --- /dev/null +++ b/src/pl/plpython/plpy_subxactobject.h @@ -0,0 +1,29 @@ +/* + * src/pl/plpython/plpy_subxactobject.h + */ + +#ifndef PLPY_SUBXACTOBJECT +#define PLPY_SUBXACTOBJECT + +/* 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); +extern PyObject *PLy_subtransaction_new(PyObject *, PyObject *); + +#endif /* PLPY_SUBXACTOBJECT */ |