On Wed, Jul 5, 2017 at 8:04 AM, Tom van Tilburg <tom.van.tilb...@gmail.com> wrote:
> I think I misunderstand. How would that help my insert statement? > You would get INSERT INTO mytable VALUES ($ javascript with a lot of > unescaped characters like /n " // etc. $); > Tom Lane provided the relevant syntax link, though if you supply an actual, shortened, example someone might show exactly what this all means for you - or how you'd need to tweak your text to make it work. $$ { "key1": "value", "key2": "value" } $$ Will be inserted as-is, explicit newlines and all. Likewise, $$ { "key1": "value", \n "key2": "value" } $$ will be inserted without any newlines and with a literal "\n" in the middle of the text. Unlike single-quote literals there is no alternate "E" form of dollar-quoting that will cause the \n to be interpreted as a newline. In practice its absence doesn't seem missed. David J.