Skip to content

Commit

Permalink
fix(PSRE-2088): error when setting owner on publication with "-"s
Browse files Browse the repository at this point in the history
  • Loading branch information
achellouche committed Jan 31, 2025
1 parent fbd95e6 commit 2821b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgresql/resource_postgresql_publication.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func setPubOwner(txn *sql.Tx, d *schema.ResourceData) error {
n := nraw.(string)
pubName := d.Get(pubNameAttr).(string)

sql := fmt.Sprintf("ALTER PUBLICATION %s OWNER TO %s", pubName, n)
sql := fmt.Sprintf("ALTER PUBLICATION %s OWNER TO \"%s\"", pubName, n)
if _, err := txn.Exec(sql); err != nil {
return fmt.Errorf("Error updating publication owner: %w", err)
}
Expand Down

0 comments on commit 2821b30

Please sign in to comment.