Remove unused code.

This commit is contained in:
Sean Chittenden 2016-11-06 09:49:05 -08:00
parent 6b540ecb55
commit 2e529146a5
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16
1 changed files with 0 additions and 15 deletions

View File

@ -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