Closed dfang closed 2 years ago
Yes. This is how PostgreSQL works, not an issue with this library.
The issue is: how to run db.Exec
without transaction block?
And the answer is: use two Execs:
var destroyAll1 = `
DROP DATABASE dbName;
`
var destroyAll2 = `
DROP USER userName;
`
db.MustExec(destroyAll1)
db.MustExec(destroyAll2)
simplified version:
when i try to drop a database and user in one sql, i got this error, i have to split the sql to make it work.