I\'m trying to get empty \"text\" fields from my table which I cleared manually with pgadmin. Initially in those fields was \'\' and I can query them like this:
SELECT mystr, mystr1
FROM mytable
WHERE COALESCE(mystr, '') = ''
OR COALESCE(mystr1, '') = ''
;
Explanation: the coalesce(a,b,c, ...)
function traverses the list a,b,c,...
from left to right and stops at the first non-null element. a,b,c
can be any expression (or constant), but must yield the same type (or be coercable to the same type).