Skip to content

Commit 38094ff

Browse files
committed
feat: compatibility with pg 18beta1
The `lowerstr` function was removed in favor of `str_tolower`
1 parent ba6566a commit 38094ff

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
pg-version: ['13', '14', '15', '16', '17']
15+
pg-version: ['13', '14', '15', '16', '17', '18']
1616

1717
steps:
1818
- uses: actions/checkout@v4

nix/xpg.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ let
33
dep = fetchFromGitHub {
44
owner = "steve-chavez";
55
repo = "xpg";
6-
rev = "v1.3.2";
7-
sha256 = "sha256-ooYqMOQD9y+/87wBd33Mvbpsx+FwEMdZoibGRM4gvBk=";
6+
rev = "v1.4.1";
7+
sha256 = "sha256-OI9g78KbguLh+ynOnRmnMM4lVOgNRAWkiI/YMmcMs+k=";
88
};
99
xpg = import dep;
1010
in

src/pg_prelude.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <catalog/namespace.h>
1010
#include <catalog/pg_authid.h>
1111
#include <catalog/pg_proc.h>
12+
#include <catalog/pg_collation_d.h>
1213
#include <commands/defrem.h>
1314
#include <commands/publicationcmds.h>
1415
#include <commands/defrem.h>
@@ -36,5 +37,6 @@
3637
#include <utils/regproc.h>
3738
#include <utils/snapmgr.h>
3839
#include <utils/varlena.h>
40+
#include <utils/formatting.h>
3941

4042
#pragma GCC diagnostic pop

src/supautils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ static bool restrict_placeholders_check_hook(char **newval, __attribute__ ((unus
11441144

11451145
if(*newval && not_empty) {
11461146
char *token, *string, *tofree;
1147-
char *val = lowerstr(*newval);
1147+
char *val = str_tolower(*newval, strlen(*newval), DEFAULT_COLLATION_OID);
11481148

11491149
tofree = string = pstrdup(placeholders_disallowed_values);
11501150

0 commit comments

Comments
 (0)