From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Seltenreich <seltenreich@gmx.de>
Cc: pgsql-hackers@postgresql.org
Cc: Oleg Bartunov <obartunov@gmail.com>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Subject: Re: [sqlsmith] FailedAssertion("!(k == indices_count)", File: "tsvector_op.c", Line: 511)
Date: Wed, 03 Aug 2016 17:52:44 -0400
Message-ID: <20542.1470261164@sss.pgh.pa.us> (raw)
In-Reply-To: <20000.1470260376@sss.pgh.pa.us>
References: <87invhoj6e.fsf@credativ.de>
<20000.1470260376@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
I wrote:
> I'm thinking there are two distinct bugs here.
Actually, make that three bugs. I was so focused on the crashing
that I failed to notice that ts_delete wasn't producing sane answers
even when it didn't crash:
regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), '{smith,smith}'::text[]);
ts_delete
---------------------
'smith' 'foo' 'bar'
(1 row)
regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), '{smith,foo}'::text[]);
ts_delete
---------------
'smith' 'bar'
(1 row)
regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), '{bar,smith}'::text[]);
ts_delete
---------------------
'smith' 'foo' 'bar'
(1 row)
The non-array version is no better:
regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), 'smith'::text);
ts_delete
---------------------
'smith' 'foo' 'bar'
(1 row)
regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), 'foo'::text);
ts_delete
---------------
'smith' 'bar'
(1 row)
regression=# select ts_delete(array_to_tsvector('{smith,foo,bar}'::text[]), 'bar'::text);
ts_delete
---------------------
'smith' 'foo' 'bar'
(1 row)
I'm not sure if ts_delete takes its second argument as verbatim lexemes
or normalizes them first, but none of these words are changed by
to_tsvector, so either way it seems to fail to delete stuff it should.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, seltenreich@gmx.de, obartunov@gmail.com, teodor@sigaev.ru
Subject: Re: [sqlsmith] FailedAssertion("!(k == indices_count)", File: "tsvector_op.c", Line: 511)
In-Reply-To: <20542.1470261164@sss.pgh.pa.us>
References: <87invhoj6e.fsf@credativ.de> <20000.1470260376@sss.pgh.pa.us> <20542.1470261164@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox