Skip to content

Commit 5154f84

Browse files
committed
Abort build against unsupported server versions
Abort compilation immediately and obviously against unsupported server versions.
1 parent f6efc1c commit 5154f84

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

postgresql_extension_template.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33

44
PG_MODULE_MAGIC;
55

6+
/* Abost compilation against unsupported versions. */
7+
#if PG_VERSION_NUM < 120000
8+
#error "Unsupported PostgreSQL Version"
9+
#endif
10+
611
Datum my_function(PG_FUNCTION_ARGS);
712
PG_FUNCTION_INFO_V1(my_function);
813

0 commit comments

Comments
 (0)