1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Fix crash of filter(tsvector)

Variable storing a position of lexeme, had a wrong type: char, it's
obviously not enough to store 2^14 possible positions.

Stas Kelvich
This commit is contained in:
Teodor Sigaev
2016-05-04 17:58:08 +03:00
parent a712487087
commit 4bbc1a7ea3

View File

@ -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);