Thread: BUG #5112: Segmentation fault on ts_stat with empty words

BUG #5112: Segmentation fault on ts_stat with empty words

From
"Yury Don"
Date:
The following bug has been logged online:

Bug reference:      5112
Logged by:          Yury Don
Email address:      yura@vpcit.ru
PostgreSQL version: 8.4.1
Operating system:   Debian Linux (architecture amd64)
Description:        Segmentation fault on ts_stat with empty words
Details:

When call ts_stat function with empty argument, backend crashes, for
example:
select word from ts_stat('select \'\'::tsvector;');
select word from ts_stat('select null::tsvector;');

This causes crash on calling ts_stat with word from stop words:
select word from ts_stat('select to_tsvector(\'me\');');

In log file there are message "server process (PID ...) was terminated by
signal 11: Segmentation fault"