Skip to content

Commit 3ef930f

Browse files
committed
PGPRO-17631: Remove support for 18+ versions.
Revert "PGPRO-12044: Use str_tolower instead of removed lowerstr and lowerstr_with_len." This reverts commit 56c47f0. Partially revert "PGPRO-10866: Use const decoration to avoid warnings:" related to d5f139cb6814f0af2d2e1106899361e45c305630 (PostgeSQL) Revert "PGPRO-12044: Add output variant for PG18 for contrib/shared_ispell/sql/security.sql test." This reverts commit bd5eeb2. Limit supported PostgreSQL versions to 17 in readme. Tags: shared_ispell
1 parent c92e015 commit 3ef930f

File tree

3 files changed

+11
-58
lines changed

3 files changed

+11
-58
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Install
1919

2020
Before build and install `shared_ispell` you should ensure following:
2121

22-
* PostgreSQL version is 9.6 or later.
22+
* PostgreSQL version is from 9.6 to 17 [^1]
2323

2424
Installing the extension is quite simple. In that case all you need to do is this:
2525

@@ -154,4 +154,9 @@ but there is not related code in the GitHub.
154154

155155
Author
156156
------
157-
Tomas Vondra [GitHub](https://github.com/tvondra)
157+
Tomas Vondra [GitHub](https://github.com/tvondra)
158+
159+
Notes
160+
------
161+
162+
[^1]: If you would like support for newer versions, please contact us: [info@postgrespro.ru](mailto:info@postgrespro.ru?subject=shared_ispell)

expected/security_1.out

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/shared_ispell.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,8 @@
5454
#include "storage/ipc.h"
5555
#include "storage/shmem.h"
5656

57-
#include "catalog/pg_collation_d.h"
5857
#include "commands/defrem.h"
5958
#include "tsearch/ts_locale.h"
60-
#include "utils/formatting.h"
6159
#include "access/htup_details.h"
6260
#include "funcapi.h"
6361
#include "utils/builtins.h"
@@ -348,7 +346,7 @@ init_shared_dict(DictInfo *info, MemoryContext infoCntx,
348346
dict->useFlagAliases = true;
349347
dict->lenAffixData = info->dict.lenAffixData;
350348
dict->nAffixData = info->dict.nAffixData;
351-
dict->AffixData = (const char **) palloc0(dict->nAffixData * sizeof(char *));
349+
dict->AffixData = (char **) palloc0(dict->nAffixData * sizeof(char *));
352350

353351
for (i = 0; i < dict->nAffixData; i++)
354352
dict->AffixData[i] = pstrdup(info->dict.AffixData[i]);
@@ -394,7 +392,7 @@ init_shared_dict(DictInfo *info, MemoryContext infoCntx,
394392
{
395393
StopList stoplist;
396394

397-
readstoplist(stopFile, &stoplist, str_tolower);
395+
readstoplist(stopFile, &stoplist, lowerstr);
398396

399397
size = sizeStopList(&stoplist, stopFile);
400398
if (size > segment_info->available)
@@ -612,7 +610,7 @@ dispell_lexize(PG_FUNCTION_ARGS)
612610
if (len <= 0)
613611
PG_RETURN_POINTER(NULL);
614612

615-
txt = str_tolower(in, len, DEFAULT_COLLATION_OID);
613+
txt = lowerstr_with_len(in, len);
616614

617615
/* need to lock the segment in shared mode */
618616
LWLockAcquire(segment_info->lock, LW_SHARED);
@@ -820,7 +818,7 @@ copyIspellDict(IspellDict *dict, char *dictFile, char *affixFile, int size, int
820818

821819
/* copy affix data */
822820
copy->dict.nAffixData = dict->nAffixData;
823-
copy->dict.AffixData = (const char **) shalloc(sizeof(char *) * dict->nAffixData);
821+
copy->dict.AffixData = (char **) shalloc(sizeof(char *) * dict->nAffixData);
824822
for (i = 0; i < copy->dict.nAffixData; i++)
825823
copy->dict.AffixData[i] = shstrcpy(dict->AffixData[i]);
826824

0 commit comments

Comments
 (0)