executeAlterDatabaseOwner changes the owner of the given database. The caller is responsible for opening and closing the database connection.
(databaseName string, owner string)
| 373 | // executeAlterDatabaseOwner changes the owner of the given database. |
| 374 | // The caller is responsible for opening and closing the database connection. |
| 375 | func (c *Cluster) executeAlterDatabaseOwner(databaseName string, owner string) error { |
| 376 | return c.execCreateOrAlterDatabase(databaseName, owner, alterDatabaseOwnerSQL, |
| 377 | "changing owner for database", "alter database owner") |
| 378 | } |
| 379 | |
| 380 | func (c *Cluster) execCreateOrAlterDatabase(databaseName, owner, statement, doing, operation string) error { |
| 381 | if !c.databaseNameOwnerValid(databaseName, owner) { |
no test coverage detected