Skip to content

Commit

Permalink
Abort build against unsupported server versions
Browse files Browse the repository at this point in the history
Abort compilation immediately and obviously against unsupported server
versions.
  • Loading branch information
kovmir committed Nov 7, 2023
1 parent f6efc1c commit 5154f84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions postgresql_extension_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

PG_MODULE_MAGIC;

/* Abost compilation against unsupported versions. */
#if PG_VERSION_NUM < 120000
#error "Unsupported PostgreSQL Version"
#endif

Datum my_function(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(my_function);

Expand Down

0 comments on commit 5154f84

Please sign in to comment.