From 025cb41e53136ae52e723bc5132f98a38456d640 Mon Sep 17 00:00:00 2001 From: Nathan Villaescusa Date: Tue, 23 Apr 2024 08:50:03 -0700 Subject: [PATCH] [redshift] Log uppercased escaped names --- lib/sql/escape.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/sql/escape.go b/lib/sql/escape.go index fd50e2b59..39f6a50d3 100644 --- a/lib/sql/escape.go +++ b/lib/sql/escape.go @@ -2,6 +2,7 @@ package sql import ( "fmt" + "log/slog" "slices" "strconv" "strings" @@ -50,6 +51,13 @@ func NeedsEscaping(name string, destKind constants.DestinationKind) bool { func EscapeName(name string, uppercaseEscNames bool, destKind constants.DestinationKind) string { if uppercaseEscNames { + if destKind == constants.Redshift { + slog.Warn("Escaped Redshift identifier is being uppercased", + slog.String("name", name), + slog.Bool("uppercaseEscapedNames", uppercaseEscNames), + ) + } + name = strings.ToUpper(name) }