Re: BUG #14245: Segfault on weird to_tsquery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Kellum <david(at)gravitext(dot)com>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: BUG #14245: Segfault on weird to_tsquery
Date: 2016-07-12 21:11:32
Message-ID: 6712.1468357892@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

David Kellum <david(at)gravitext(dot)com> writes:
> On Tue, Jul 12, 2016 at 12:42 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Note that while crashing is certainly not good, the pre-9.6 behavior
>> can hardly be called correct either. What happened to 'a'?

> 'a' is a stopword, dropped by to_tsquery() as described here:

Ah! OK, so it's probably necessary to have a stopword there in order
to break it.

BTW, all these variants also crash:

select to_tsquery('!(a | !b) & c') as tsquery;
select to_tsquery('!( !b & a) & c') as tsquery;
select to_tsquery('!( !b | a) & c') as tsquery;

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2016-07-12 22:54:04 Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file
Previous Message David Kellum 2016-07-12 20:54:53 Re: BUG #14245: Segfault on weird to_tsquery

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-07-12 22:10:27 Re: IMPORT FOREIGN SCHEMA can't be run in in pl/pgsql due to INTO
Previous Message Tom Lane 2016-07-12 20:59:23 Re: pgbench - minor fix for meta command only scripts