Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc92e015

Browse files
Merge pull request#8 from postgrespro/PGPRO-12044
Fixes for PostgreSQL 18devel
2 parentse73c3d5 +fc606df commitc92e015

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

‎expected/security_1.out‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
create type si_dicts_result as (dict_name VARCHAR, affix_name VARCHAR, words INT, affixes INT, bytes INT);
2+
create function shared_ispell_dicts( OUT dict_name VARCHAR, OUT affix_name VARCHAR, OUT words INT, OUT affixes INT, OUT bytes INT)
3+
returns SETOF record as $$
4+
declare
5+
qString varchar(4000);
6+
rec si_dicts_result;
7+
begin
8+
qString := 'select * from shared_ispell_dicts()';
9+
for rec in execute qString loop
10+
return NEXT;
11+
end loop;
12+
return;
13+
end
14+
$$ language plpgsql;
15+
create extension shared_ispell;
16+
ERROR: function "shared_ispell_dicts" already exists with same argument types
17+
CONTEXT: SQL statement "CREATE FUNCTION shared_ispell_dicts( OUT dict_name VARCHAR, OUT affix_name VARCHAR, OUT words INT, OUT affixes INT, OUT bytes INT)
18+
RETURNS SETOF record
19+
AS '$libdir/shared_ispell', 'dispell_list_dicts'
20+
LANGUAGE C IMMUTABLE"
21+
extension script file "shared_ispell--1.1.0.sql", near line 26
22+
drop extension if exists shared_ispell;
23+
NOTICE: extension "shared_ispell" does not exist, skipping
24+
drop type si_dicts_result;
25+
drop function shared_ispell_dicts();
26+
create type si_stoplists_result as (stop_name VARCHAR, words INT, bytes INT);
27+
create function shared_ispell_stoplists(OUT stop_name VARCHAR, OUT words INT, OUT bytes INT)
28+
returns SETOF record as $$
29+
declare
30+
rec si_stoplists_result;
31+
qString varchar(4000);
32+
begin
33+
qString := 'select * from shared_ispell_stoplists()';
34+
for rec in execute qString loop
35+
return NEXT;
36+
end loop;
37+
return;
38+
end
39+
$$ language plpgsql;
40+
create extension shared_ispell;
41+
ERROR: function "shared_ispell_stoplists" already exists with same argument types
42+
CONTEXT: SQL statement "CREATE FUNCTION shared_ispell_stoplists( OUT stop_name VARCHAR, OUT words INT, OUT bytes INT)
43+
RETURNS SETOF record
44+
AS '$libdir/shared_ispell', 'dispell_list_stoplists'
45+
LANGUAGE C IMMUTABLE"
46+
extension script file "shared_ispell--1.1.0.sql", near line 31
47+
drop extension if exists shared_ispell;
48+
NOTICE: extension "shared_ispell" does not exist, skipping
49+
drop type si_stoplists_result;
50+
drop function shared_ispell_stoplists();

‎src/shared_ispell.c‎

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

57+
#include"catalog/pg_collation_d.h"
5758
#include"commands/defrem.h"
5859
#include"tsearch/ts_locale.h"
60+
#include"utils/formatting.h"
5961
#include"access/htup_details.h"
6062
#include"funcapi.h"
6163
#include"utils/builtins.h"
@@ -392,7 +394,7 @@ init_shared_dict(DictInfo *info, MemoryContext infoCntx,
392394
{
393395
StopListstoplist;
394396

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

397399
size=sizeStopList(&stoplist,stopFile);
398400
if (size>segment_info->available)
@@ -610,7 +612,7 @@ dispell_lexize(PG_FUNCTION_ARGS)
610612
if (len <=0)
611613
PG_RETURN_POINTER(NULL);
612614

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

615617
/* need to lock the segment in shared mode */
616618
LWLockAcquire(segment_info->lock,LW_SHARED);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp