-
Hi! I'm using pg-promise to insert many values with only one query, with something like that:
( But it generates an error as the $ is not cleaned by pg-promise. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Why are you expecting for the dollar to be escaped? It doesn't need to be. I ran that exact code, and there was no error in the code generated: INSERT INTO "my_table"("externalId","skills") VALUES('Foo',ARRAY['Toshop','InDesign']),('Bar',ARRAY['unescaped$Dollars','Excel']) So I don't know what error or issue you are talking about. |
Beta Was this translation helpful? Give feedback.
-
Hello, yes my bad, the problem was due to the way JavaScript handle dollar when present in the string replacing another with str.replace() function. Thanks for the quick answer and your patience |
Beta Was this translation helpful? Give feedback.
Why are you expecting for the dollar to be escaped? It doesn't need to be.
I ran that exact code, and there was no error in the code generated:
So I don't know what error or issue you are talking about.