aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plpython/plpy_elog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plpython/plpy_elog.h')
-rw-r--r--src/pl/plpython/plpy_elog.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/pl/plpython/plpy_elog.h b/src/pl/plpython/plpy_elog.h
new file mode 100644
index 00000000000..eafc6e4e109
--- /dev/null
+++ b/src/pl/plpython/plpy_elog.h
@@ -0,0 +1,24 @@
+/*
+ * src/pl/plpython/plpy_elog.h
+ */
+
+#ifndef PLPY_ELOG_H
+#define PLPY_ELOG_H
+
+/* global exception classes */
+extern PyObject *PLy_exc_error;
+extern PyObject *PLy_exc_fatal;
+extern PyObject *PLy_exc_spi_error;
+
+extern void PLy_elog(int, const char *,...)
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
+
+extern void PLy_exception_set(PyObject *, const char *,...)
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
+
+extern void PLy_exception_set_plural(PyObject *, const char *, const char *,
+ unsigned long n,...)
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 5)))
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 5)));
+
+#endif /* PLPY_ELOG_H */