Re: BUG #14245: Segfault on weird to_tsquery

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #14245: Segfault on weird to_tsquery
Дата
Msg-id 2157.1468352545@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #14245: Segfault on weird to_tsquery  (david@gravitext.com)
Ответы Re: BUG #14245: Segfault on weird to_tsquery  (David Kellum <david@gravitext.com>)
Список pgsql-bugs
david@gravitext.com writes:
> I am doing some (fuzz) testing of full text queries and managed to
> generate the following case which causes a SEGFAULT on PostgreSQL 9.6
> beta1 and beta2:
> select to_tsquery('!(a & !b) & c') as tsquery
> This weird query outputs the following on 9.5.2, instead of crashing:
> "!( !'b' ) & 'c'"

Note that while crashing is certainly not good, the pre-9.6 behavior
can hardly be called correct either.  What happened to 'a'?

Also, it looks like this is specific to to_tsquery; if you just feed
the same thing to tsqueryin, it seems fine with it:

# select '!(a & !b) & c'::tsquery;
        tsquery
-----------------------
 !( 'a' & !'b' ) & 'c'
(1 row)

            regards, tom lane

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

Предыдущее
От: David Kellum
Дата:
Сообщение: Re: BUG #14245: Segfault on weird to_tsquery
Следующее
От: David Kellum
Дата:
Сообщение: Re: BUG #14245: Segfault on weird to_tsquery