Fix several bugs in tsvectorin, including crash due to uninitialized field and
miscomputation of required palloc size. The crash could only occur if the
input contained lexemes both with and without positions, which is probably not
common in practice. The miscomputation would definitely result in wasted
space. Also fix some inconsistent coding around alignment of strings and
positions in a tsvector value; these errors could also lead to crashes given
mixed with/without position data and a machine that's picky about alignment.
And be more careful about checking for overflow of string offsets.
Patch is only against HEAD --- I have not looked to see if same bugs are
in back-branch contrib/tsearch2 code.
to_tsany.c (r1.4 -> r1.5)
tsvector.c (r1.5 -> r1.6)
tsvector_op.c (r1.5 -> r1.6)
pgsql-committers by date
|Next:||From: Tom Lane||Date: 2007-10-23 01:44:40|
|Subject: pgsql: Fix two-argument form of ts_rewrite() so it actually works for |
|Previous:||From: Tom Lane||Date: 2007-10-22 21:34:33|
|Subject: pgsql: Clarify example of planner cost computation, per a suggestion |