Skip to content

Commit

Permalink
Remove unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
sean- committed Dec 10, 2016
1 parent 6b540ec commit 2e52914
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions builtin/providers/postgresql/resource_postgresql_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,21 +382,6 @@ func resourcePostgreSQLDatabaseUpdate(d *schema.ResourceData, meta interface{})
return resourcePostgreSQLDatabaseRead(d, meta)
}

func grantRoleMembership(conn *sql.DB, dbOwner string, connUsername string) error {
if dbOwner != "" && dbOwner != connUsername {
query := fmt.Sprintf("GRANT %s TO %s", pq.QuoteIdentifier(dbOwner), pq.QuoteIdentifier(connUsername))
_, err := conn.Query(query)
if err != nil {
// is already member or role
if strings.Contains(err.Error(), "duplicate key value violates unique constraint") {
return nil
}
return errwrap.Wrapf("Error granting membership: {{err}}", err)
}
}
return nil
}

func setDBName(conn *sql.DB, d *schema.ResourceData) error {
if !d.HasChange(dbNameAttr) {
return nil
Expand Down

0 comments on commit 2e52914

Please sign in to comment.