Skip to content

Commit

Permalink
Fix query used to drop Postgres DB.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-osman committed Feb 19, 2023
1 parent 41cedd2 commit c05fa06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dbman/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ func (p *Postgres) ListDatabases() ([]string, error) {
}

func (p *Postgres) DeleteDatabase(name string) error {
_, err := p.conn.Query("DROP DATABASE ?", name)
_, err := p.conn.Query(
fmt.Sprintf("DROP DATABASE %s", pq.QuoteIdentifier(name)),
)
return err
}

Expand Down

0 comments on commit c05fa06

Please sign in to comment.