PostgresQL 에서는 스트링을 감쌀때 single quote 를 사용하는데 대신에 $$ 를 사용할수 있습니다.
스트링자체내에 single quote 를 포함고 있으면 escape 해주어야 하는데 $$ 를 사용한다면 편하게 사용할수 있습니다.
예제를 보시죠.
postgres@[local]:5432:postgres]
SQL> select 'Where''s my car?';
?column?
-----------------
Where's my car?
(1 row)
postgres@[local]:5432:postgres]
SQL> select $$Where's my car?$$;
?column?
-----------------
Where's my car?
(1 row)
postgres@[local]:5432:postgres]
SQL> select $$Where''s my car?$$; -- double quote 가 아닌 single quote 2개
?column?
------------------
Where''s my car?
(1 row)
postgres@[local]:5432:postgres]
SQL>