[jOOQ/jOOQ#10467] PostgresUtils.toPGArray does not handle escaped quotes

This also fixes [jOOQ/jOOQ#6819]
This commit is contained in:
Lukas Eder 2020-08-05 12:22:55 +02:00
parent 1fb4ee3cf0
commit 0b12538c34

View File

@ -386,10 +386,11 @@ public class PostgresUtils {
// Consume a backslash
else if (c == '\\') {
char n = input.charAt(i + 1);
// Consume an escaped backslash
if (input.charAt(i + 1) == '\\') {
sb.append(c);
// [#10467] Consume an escaped backslash or quote
if (n == '\\' || n == '"') {
sb.append(n);
i++;
}