pgsql: Fix several bugs in tsvectorin, including crash due to

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix several bugs in tsvectorin, including crash due to
Дата
Msg-id 20071023005123.AEF5B754229@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/tsearch:
        to_tsany.c (r1.4 -> r1.5)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tsearch/to_tsany.c?r1=1.4&r2=1.5)
    pgsql/src/backend/utils/adt:
        tsvector.c (r1.5 -> r1.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsvector.c?r1=1.5&r2=1.6)
        tsvector_op.c (r1.5 -> r1.6)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsvector_op.c?r1=1.5&r2=1.6)

В списке pgsql-committers по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Clarify example of planner cost computation, per a suggestion
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix two-argument form of ts_rewrite() so it actually works for