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
pull/12/head^2
Teodor Sigaev 10 years ago
parent a712487087
commit 4bbc1a7ea3
  1. 4
      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);

Loading…
Cancel
Save