Skip to content

Commit

Permalink
Merge pull request #3358 from lonvia/pg-module-for-pg16
Browse files Browse the repository at this point in the history
Fix compilation of legacy module for PostgreSQL 16
  • Loading branch information
lonvia authored Mar 7, 2024
2 parents e929693 + edb1eec commit 11ced26
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ jobs:
needs: create-archive
runs-on: ubuntu-20.04

strategy:
matrix:
postgresql: ["13", "16"]

steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -149,11 +153,13 @@ jobs:

- uses: ./Nominatim/.github/actions/setup-postgresql
with:
postgresql-version: 13
postgresql-version: ${{ matrix.postgresql }}
postgis-version: 3

- name: Install Postgresql server dev
run: sudo apt-get install postgresql-server-dev-13
run: sudo apt-get install postgresql-server-dev-$PGVER
env:
PGVER: ${{ matrix.postgresql }}

- uses: ./Nominatim/.github/actions/build-nominatim
with:
Expand Down
2 changes: 1 addition & 1 deletion module/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# just use the pgxs makefile

foreach(suffix ${PostgreSQL_ADDITIONAL_VERSIONS} "15" "14" "13" "12" "11" "10" "9.6")
foreach(suffix ${PostgreSQL_ADDITIONAL_VERSIONS} "16" "15" "14" "13" "12" "11" "10" "9.6")
list(APPEND PG_CONFIG_HINTS
"/usr/pgsql-${suffix}/bin")
endforeach()
Expand Down
6 changes: 4 additions & 2 deletions module/nominatim.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
#include "mb/pg_wchar.h"
#include <utfasciitable.h>

#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
#if PG_MAJORVERSION_NUM > 15
#include "varatt.h"
#endif

PG_MODULE_MAGIC;

Datum transliteration( PG_FUNCTION_ARGS );
Datum gettokenstring( PG_FUNCTION_ARGS );
void str_replace(char* buffer, int* len, int* changes, char* from, int fromlen, char* to, int tolen, int);
Expand Down

0 comments on commit 11ced26

Please sign in to comment.