projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a712487
)
Fix crash of filter(tsvector)
author
Teodor Sigaev
Wed, 4 May 2016 14:58:08 +0000
(17:58 +0300)
committer
Teodor Sigaev
Wed, 4 May 2016 14:58:08 +0000
(17:58 +0300)
Variable storing a position of lexeme, had a wrong type: char, it's
obviously not enough to store 2^14 possible positions.
Stas Kelvich
src/backend/utils/adt/tsvector_op.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/tsvector_op.c
b/src/backend/utils/adt/tsvector_op.c
index 8298e38545b80101883e86ec557839118b391f0c..b138bf10ca124861a3d2ea740e88d80db08a38ab 100644
(file)
--- a/
src/backend/utils/adt/tsvector_op.c
+++ b/
src/backend/utils/adt/tsvector_op.c
@@
-773,8
+773,8
@@
tsvector_filter(PG_FUNCTION_ARGS)
bool *nulls;
int nweigths;
int i, j;
- char mask = 0,
-
cur_pos
= 0;
+ int cur_pos = 0;
+
char mask
= 0;
deconstruct_array(weights, CHAROID, 1, true, 'c',
&dweights, &nulls, &nweigths);