Commit 227bf85e by Marcus Efraimsson Committed by GitHub

Merge pull request #13184 from svenklemm/postgres-interval_ms

Fix postgres quoting to handle non-string values
parents 37af10c6 6b863e3b
...@@ -44,15 +44,15 @@ export default class PostgresQuery { ...@@ -44,15 +44,15 @@ export default class PostgresQuery {
} }
quoteIdentifier(value) { quoteIdentifier(value) {
return '"' + value.replace(/"/g, '""') + '"'; return '"' + String(value).replace(/"/g, '""') + '"';
} }
quoteLiteral(value) { quoteLiteral(value) {
return "'" + value.replace(/'/g, "''") + "'"; return "'" + String(value).replace(/'/g, "''") + "'";
} }
escapeLiteral(value) { escapeLiteral(value) {
return value.replace(/'/g, "''"); return String(value).replace(/'/g, "''");
} }
hasTimeGroup() { hasTimeGroup() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment