diff --git a/pkg/flypg/admin/admin.go b/pkg/flypg/admin/admin.go index 73d4caf..d47965f 100644 --- a/pkg/flypg/admin/admin.go +++ b/pkg/flypg/admin/admin.go @@ -297,7 +297,7 @@ func SetReadonly(ctx context.Context, pg *pgx.Conn, enable bool) error { continue } - sql := fmt.Sprintf("ALTER DATABASE %s SET default_transaction_read_only=%v;", db.Name, enable) + sql := fmt.Sprintf("ALTER DATABASE %q SET default_transaction_read_only=%v;", db.Name, enable) if _, err = pg.Exec(ctx, sql); err != nil { return fmt.Errorf("failed to alter readonly state on db %s: %s", db.Name, err) }