summaryrefslogtreecommitdiff
path: root/src/pl/plpython/plpython.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-03-04 21:51:14 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-03-04 21:51:14 -0500
commit63b656b7bf39beb5b6095ab2b5e1e4e9d8c6a965 (patch)
tree2d116388fbe0c64f1b3887b254ff58d163df2d43 /src/pl/plpython/plpython.c
parentefa415da8c0fb8c1c0bc50faebac430f8b917571 (diff)
Create extension infrastructure for the core procedural languages.
This mostly just involves creating control, install, and update-from-unpackaged scripts for them. However, I had to adjust plperl and plpython to not share the same support functions between variants, because we can't put the same function into multiple extensions. catversion bump forced due to new contents of pg_pltemplate, and because initdb now installs plpgsql as an extension not a bare language. Add support for regression testing these as extensions not bare languages. Fix a couple of other issues that popped up while testing this: my initial hack at pg_dump binary-upgrade support didn't work right, and we don't want an extra schema permissions test after all. Documentation changes still to come, but I'm committing now to see whether the MSVC build scripts need work (likely they do).
Diffstat (limited to 'src/pl/plpython/plpython.c')
-rw-r--r--src/pl/plpython/plpython.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index 75f7b5cf57f..e415aa36f41 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -4652,3 +4652,36 @@ PLyUnicode_FromString(const char *s)
}
#endif /* PY_MAJOR_VERSION >= 3 */
+
+#if PY_MAJOR_VERSION < 3
+
+/* Define aliases plpython2_call_handler etc */
+Datum plpython2_call_handler(PG_FUNCTION_ARGS);
+Datum plpython2_inline_handler(PG_FUNCTION_ARGS);
+Datum plpython2_validator(PG_FUNCTION_ARGS);
+
+PG_FUNCTION_INFO_V1(plpython2_call_handler);
+
+Datum
+plpython2_call_handler(PG_FUNCTION_ARGS)
+{
+ return plpython_call_handler(fcinfo);
+}
+
+PG_FUNCTION_INFO_V1(plpython2_inline_handler);
+
+Datum
+plpython2_inline_handler(PG_FUNCTION_ARGS)
+{
+ return plpython_inline_handler(fcinfo);
+}
+
+PG_FUNCTION_INFO_V1(plpython2_validator);
+
+Datum
+plpython2_validator(PG_FUNCTION_ARGS)
+{
+ return plpython_validator(fcinfo);
+}
+
+#endif /* PY_MAJOR_VERSION < 3 */