data jsonb NOT NULL DEFAULT $${}$$::jsonb
what does $${}$$
on table creation? Can't find anything on the internet. Thanks
Asked
Active
Viewed 42 times
0

Bogdan Dubyk
- 4,756
- 7
- 30
- 67
1 Answers
2
In Postgres $$
(or $anything$
) is an alternative for a single quotation mark ('
) to enclose character literals. In other words, $${}$$
is equivalent to '{}'
.
It's commonly used to quote strings that themselves might contain single quotation marks, or strings inside dynamic SQL that is already enclosed in single quotes.

mustaccio
- 18,234
- 16
- 48
- 57
-
but is there any real reason for that? I mean should I avoid using `'{}'`? – Bogdan Dubyk May 23 '23 at 21:19