Skip to content

Commit cd8885d

Browse files
authored
Correct the Database Connection (#120)
Using the correct db connection for ALTER schema operations.
1 parent 0660c2d commit cd8885d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/postgres/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (c *pg) CreateSchema(db, role, schema string, logger logr.Logger) error {
5959
// Set the schema owner in a separate step, because AWS RDS breaks if
6060
// you try to create a schema and set the owner in a single command.
6161
// See: https://github.com/movetokube/postgres-operator/issues/91
62-
_, err = c.db.Exec(fmt.Sprintf(ALTER_SCHEMA_OWNER, schema, role))
62+
_, err = tmpDb.Exec(fmt.Sprintf(ALTER_SCHEMA_OWNER, schema, role))
6363
if err != nil {
6464
return err
6565
}

0 commit comments

Comments
 (0)