Skip to content

Commit

Permalink
Fix: Preserve numeric values in dynamic table names, preventing remov…
Browse files Browse the repository at this point in the history
…al from the middle or end of the string
  • Loading branch information
ParthaI committed Oct 30, 2024
1 parent f02650e commit 9bc85de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion servicenow/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ func pluginTableDefinitions(ctx context.Context, d *plugin.TableMapData) (map[st
return tables, nil
}

var re = regexp.MustCompile(`\d+`)
// In PostgreSQL, table names must start with a letter (a-z) or an underscore (_). They cannot begin with a number
var re = regexp.MustCompile(`^\d+`)
var substitution = ``
servicenowTables := []string{}
servicenowTables = append(servicenowTables, *config.Objects...)
Expand Down

0 comments on commit 9bc85de

Please sign in to comment.