Re: [sqlsmith] FailedAssertion("!(k == indices_count)", File: "tsvector_op.c", Line: 511)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [sqlsmith] FailedAssertion("!(k == indices_count)", File: "tsvector_op.c", Line: 511)
Дата
Msg-id 20542.1470261164@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [sqlsmith] FailedAssertion("!(k == indices_count)", File: "tsvector_op.c", Line: 511)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [sqlsmith] FailedAssertion("!(k == indices_count)", File: "tsvector_op.c", Line: 511)  (Noah Misch <noah@leadboat.com>)
Список pgsql-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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [sqlsmith] FailedAssertion("!(k == indices_count)", File: "tsvector_op.c", Line: 511)
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [sqlsmith] FailedAssertion("!(k == indices_count)", File: "tsvector_op.c", Line: 511)