summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ab46d8f..8da6b67 100644
--- a/Makefile
+++ b/Makefile
@@ -20,3 +20,16 @@ clean:
rm -f *.pb.go *.patch
-rm -f go.*
-go-mod-clean purge
+
+build:
+ go build -o add_two.dll -buildmode=c-shared
+ # PS D:\C\myextension> go build -o add_two.dll -buildmode=c-shared
+ # In PostgreSQL: open the query window (adjust path to your generated dynamically loaded library and header file (.dll, .h).
+ # CREATE FUNCTION add_two(int4) RETURNS int4
+ # AS 'D:/C/myextension/add_two.dll', 'add_two'
+ # LANGUAGE C STRICT;
+ # And finally test it:
+ # SELECT add_two(10)
+ # Result:
+ # add_two (integer)
+ # 1 13