Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> I missed it. Thanks. Nearly perfect. Now I've to understand what a
> {} is.
> An array with a null element? an empty array? an array containing ''?
Hmm ... it appears that ts_lexize is returning a one-dimensional array of
no elements, whereas '{}'::text[] returns a zero-dimensional array;
as does array[]::text[] so you can't easily get around it :-(
We probably ought to clean this up...
In the meantime it looks like you could check for
"array_upper(lexemes,1) > 0".
regards, tom lane