From fb051b5577af405288a02869daa07d9e9492f8b4 Mon Sep 17 00:00:00 2001 From: Hein Date: Thu, 30 Apr 2026 15:38:21 +0200 Subject: [PATCH] fix(spectypes): correct quoting logic in formatPostgresStringArray --- pkg/spectypes/sql_array_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/spectypes/sql_array_types.go b/pkg/spectypes/sql_array_types.go index 12630ea..921387b 100644 --- a/pkg/spectypes/sql_array_types.go +++ b/pkg/spectypes/sql_array_types.go @@ -66,7 +66,7 @@ func formatPostgresStringArray(vals []string) string { parts := make([]string, len(vals)) for i, v := range vals { // Quote if value contains comma, double-quote, backslash, braces, whitespace, or is empty. - needsQuote := v == "" || strings.ContainsAny(v, `,"\\{}` + "\t\n\r ") + needsQuote := v == "" || strings.ContainsAny(v, `,"\\{}`+"\t\n\r ") if needsQuote { v = strings.ReplaceAll(v, `\`, `\\`) v = strings.ReplaceAll(v, `"`, `""`)