summaryrefslogtreecommitdiff
path: root/add_two.c
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-11-01 10:26:18 -0500
committerJeff Carr <[email protected]>2025-11-01 10:26:18 -0500
commita8ee202a434b6929a2f5488be5b1c0a0e10d6c02 (patch)
tree811b002d5e46b2ca223f403f425e9c5962519466 /add_two.c
parent9e2da246d52558670685ffe86c25787b55c6b4a6 (diff)
example .c file on windowsHEADmasterdevel
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));
+}