summaryrefslogtreecommitdiff
path: root/src/pl/plpython/plpy_plpymodule.h
diff options
context:
space:
mode:
authorPeter Eisentraut2011-12-18 19:14:16 +0000
committerPeter Eisentraut2011-12-18 19:24:00 +0000
commit147c2482542868d1f9dcf7d2ecfeac58d845335c (patch)
tree11617370d58bfc7ff6cca2b5b78212dd804a1147 /src/pl/plpython/plpy_plpymodule.h
parent59e242a4969d2efa6ce68dc7aab3cbd8cf975b08 (diff)
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_plpymodule.h')
-rw-r--r--src/pl/plpython/plpy_plpymodule.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/pl/plpython/plpy_plpymodule.h b/src/pl/plpython/plpy_plpymodule.h
new file mode 100644
index 00000000000..930ecfd1b17
--- /dev/null
+++ b/src/pl/plpython/plpy_plpymodule.h
@@ -0,0 +1,19 @@
+/*
+ * src/pl/plpython/plpy_plpymodule.h
+ */
+
+#ifndef PLPY_PLPYMODULE_H
+#define PLPY_PLPYMODULE_H
+
+#include "utils/hsearch.h"
+
+/* A hash table mapping sqlstates to exceptions, for speedy lookup */
+extern HTAB *PLy_spi_exceptions;
+
+
+#if PY_MAJOR_VERSION >= 3
+PyMODINIT_FUNC PyInit_plpy(void);
+#endif
+extern void PLy_init_plpy(void);
+
+#endif /* PLPY_PLPYMODULE_H */