select
a_title,
regexp_replace(a_title, ' +', ' ', 'g')
from articles
where
a_status = 't'
and a_title ~ ' '
update articles
set
a_title = regexp_replace(a_title, ',', ' ')
where
a_status = 't'
and a_title ~ ','
update articles
set
a_title = regexp_replace(a_title, ' +', ' ', 'g')
where
a_status = 't'
and a_title ~ ' '
4 sty 2013