PostgreSQL: search for fields starting or ending with whitespace Sep 9, 2020 select * from table_name where column_name ~ '^\s+|\s+$';