I'm using Postgres 9.5. I want to search for rows in which my name column does not contain a space. I'm a little murky on how to define a space to you, though. I thought it would just be the space bar on my keyboard, so I ran:
.... where name not like '% %';
but then I got some results like this:
| JASON FALKNER
That sure looks like a space to me, but there are probably some other things going on. Is there a better way I can scan for rows in which my name column doesn't contain a space?
Using a regexp,
not (name ~ '\s') still returned columns that looked like they had a space.
select cast(name as bytea) ... where name not like like '% %';
However, I'm still a little unclear how I use that data to figure out how to screen spaces from my results.
where not (name ~ '[[:space:]]')' and it's returning "JASON BLAKE" with the same byte sequence above,