summaryrefslogtreecommitdiff
path: root/add_two.c
diff options
context:
space:
mode:
Diffstat (limited to 'add_two.c')
-rw-r--r--add_two.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/add_two.c b/add_two.c
new file mode 100644
index 0000000..78a268f
--- /dev/null
+++ b/add_two.c
@@ -0,0 +1,19 @@
+#include "postgres.h"
+#include "fmgr.h"
+
+
+PG_MODULE_MAGIC;
+
+
+extern int32 Adder(int32);
+
+
+PG_FUNCTION_INFO_V1(add_two);
+
+
+Datum
+add_two(PG_FUNCTION_ARGS)
+{
+ int32 arg = PG_GETARG_INT32(0);
+ PG_RETURN_INT32(Adder(arg));
+}