Can't find names with criteria that has special symbols in PostgreSQL
|| is the operator to concatenate strings in SQL. You probably want OR. 

Additionally: LIKE without a wildcard does not make sense. e.name_related like ',' is the same as e.name_related = ','. Multiple ORs are the same as IN so you can simplify your condition to:

(
  e.name_related IN ('', ',', '.') OR e.name_related like '%x%' OR
  e.d_name in ('', '.', ',') OR e.d_name like '%x%' OR 
  e.father_name IN ('', '.', ',') OR e.father_name like '%x%' OR
  e.d_father_name IN ('', '.', ',') OR e.d_father_name like '%x%'
)