Why is this so tricky, what is token set to that it isn't equal to null nor an empty string?
SELECT lexemes
FROM ts_debug('This is a title')
WHERE alias = 'asciiword';
lexemes
---------
{}
{}
{}
{titl}
(4 rows)
Ok.. So I want to get rid of {},
SELECT lexemes
FROM ts_debug('This is a title')
WHERE alias = 'asciiword'
AND lexemes <> '{}'
AND lexemes <> ARRAY[]::text[]
AND lexemes IS NOT NULL
AND lexemes <> ARRAY[' ']
AND lexemes <> ARRAY[null]::text[];
I knew most of these wouldn't work., but I'm totally confused why <> '{}' wouldn't work not <> ARRAY[]::text;. How do I filter this out?
array_lengthyesterday but it seemed like an ugly work around. Being simply a bug explains a lot more. I wonder why Pg lets you create empty arrays with dimensionality. – Evan Carroll Sep 23 '17 at 14:27construct_[md_]array()handle empty arrays correctly. So this should be fixed for good soon. – Erwin Brandstetter Sep 25 '17 at 23:37