Escaping Backslashes in Postgresql

I need to write a file to disk from postgres that has character string of a backslash immediately followed by a forward slash \/ Code similar to this has not worked: drop table if exists test; cr...