0

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

0

1 Answer 1

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.

Reference

Sign up to request clarification or add additional context in comments.

1 Comment

but is there any real reason for that? I mean should I avoid using '{}'?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.