Jean-Christophe Arnu <jca...@gmail.com> writes: > [ empty_string_in_tsvector_v4.patch ]
I looked through this patch a bit. I don't agree with adding these new error conditions to tsvector_setweight_by_filter and tsvector_delete_arr. Those don't prevent bad lexemes from being added to tsvectors, so AFAICS they can have no effect other than breaking existing applications. In fact, tsvector_delete_arr is one thing you could use to fix existing bad tsvectors, so making it throw an error seems actually counterproductive. (By the same token, I think there's a good argument for tsvector_delete_arr to just ignore nulls, not throw an error. That's a somewhat orthogonal issue, though.) What I'm wondering about more than that is whether array_to_tsvector is the only place that can inject an empty lexeme ... don't we have anything else that can add lexemes without going through the parser? regards, tom lane