I have a table with large amount of 'S wrongly added and i want to replace it for 's:
I have tried with replace(field, ''S', ''s') but obviously doesn't accept it for the ', I also tired with the $$'$$ but still doesn't work.
The current version of PostgreSQL is 11 I have look into different threads and tried the solution there but didn't recognize i.e.
CodePudding user response:
The quote is the escape character for quotes as well. So you need one more quote for each string: replace(field, '''S', '''s')
