I'm trying to use SELECT regexp_replace(m.*, '[\n\r]+', ' ', 'g')
to remove carriage returns and new lines from my field to generate a CSV from my table; however, looks like my postgresql version (7.4.27) does not support that function.
function regexp_replace(members, "unknown", "unknown", "unknown") does not exist
I also tried doing it this way:
SELECT replace(replace(m.*, '\r', ''), '\n', '')
function replace(members, "unknown", "unknown") does not exist
No function matches the given name and argument types. You may need to add explicit type casts.
or this way:
SELECT replace(replace(m.*, chr(13), ''), chr(10), '')
function replace(members, text, "unknown") does not exist
and still got similar errors.
How can a achieve that using another function or solution?