Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation of legacy module for PostgreSQL 16 #3358

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading