[PostgreSQL] How to remove the lines from the enter key in
1 min readOct 11, 2017
Sometimes the texts sent to the bank go with line break spacing as in the case:
Lory esplusum dois atuns e um pudim
lory espupu mucadaki medi dao
Lory esplusum dois atuns e um pudim
And this often when brought to a report gets formatted the wrong way.
To solve this problem we use regexp_replace in our query.
e.g:
select field1, field2,
regexp_replace(field3, E'[\\n\\r]+', ' ', 'g' )
from table1
Query output returns without row wrappings