diff --git a/jrunner/src/main/java/jrunner/jrunner.java b/jrunner/src/main/java/jrunner/jrunner.java index f786052..53efd93 100644 --- a/jrunner/src/main/java/jrunner/jrunner.java +++ b/jrunner/src/main/java/jrunner/jrunner.java @@ -311,6 +311,14 @@ public class jrunner { nr = ""; for (int i = 1; i <= cols; i++){ switch (dtn[i].toUpperCase()){ + // PG string-ish types that otherwise fall to the default + // case and get emitted UNQUOTED (breaking the INSERT): + // jsonb/json carry embedded quotes, bpchar is PG's char(n), + // uuid is a quoted literal. Quote them like varchar. + case "JSON": + case "JSONB": + case "BPCHAR": + case "UUID": case "VARCHAR": case "NVARCHAR": nc = rs.getString(i);