Skip to content

Commit

Permalink
sql/postgres: trim schema from operator only if schema is known (#2731)
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m authored Apr 30, 2024
1 parent 5663cd7 commit 87cf226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/postgres/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ func NewOperator(scope string, name string) *Operator {
// installed by extensions.
if parts := strings.FieldsFunc(name, func(r rune) bool {
return r == '.'
}); len(parts) == 2 && scope == "" || parts[0] == "pg_catalog" || parts[0] == scope {
}); len(parts) == 2 && (scope == "" || parts[0] == "pg_catalog" || parts[0] == scope) {
return &Operator{Name: parts[1]}
}
return &Operator{Name: name}
Expand Down

0 comments on commit 87cf226

Please sign in to comment.