MCPcopy Index your code
hub / github.com/zalando/postgres-operator / executeAlterDatabaseOwner

Method executeAlterDatabaseOwner

pkg/cluster/database.go:375–378  ·  view source on GitHub ↗

executeAlterDatabaseOwner changes the owner of the given database. The caller is responsible for opening and closing the database connection.

(databaseName string, owner string)

Source from the content-addressed store, hash-verified

373// executeAlterDatabaseOwner changes the owner of the given database.
374// The caller is responsible for opening and closing the database connection.
375func (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
380func (c *Cluster) execCreateOrAlterDatabase(databaseName, owner, statement, doing, operation string) error {
381 if !c.databaseNameOwnerValid(databaseName, owner) {

Callers 1

syncDatabasesMethod · 0.95

Calls 1

Tested by

no test coverage detected