Skip to content

Commit

Permalink
Quote table name in OpSetReplicaIdentity
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-farries committed Nov 24, 2023
1 parent 763dabc commit d0acbbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/migrations/op_set_replica_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ func (o *OpSetReplicaIdentity) Start(ctx context.Context, conn *sql.DB, stateSch
}

// set the replica identity on the underlying table
_, err := conn.ExecContext(ctx, fmt.Sprintf("ALTER TABLE %s REPLICA IDENTITY %s", o.Table, identitySQL))
_, err := conn.ExecContext(ctx, fmt.Sprintf("ALTER TABLE %s REPLICA IDENTITY %s",
pq.QuoteIdentifier(o.Table),
identitySQL))
return err
}

Expand Down

0 comments on commit d0acbbb

Please sign in to comment.