More than 5 years have passed since last update.
開始クォートの前に E をつける。小文字でもよい。
SELECT E'foo\nbar'
Register as a new user and use Qiita more conveniently