Use a string instead of the `%t` modifier for printing a bool in SQL

pull/10682/head
Sean Chittenden 10 years ago
parent 5b66bf0745
commit 3779dfffa9
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16

@ -169,8 +169,11 @@ func resourcePostgreSQLDatabaseCreate(d *schema.ResourceData, meta interface{})
continue
}
val := v.(bool)
createOpts = append(createOpts, fmt.Sprintf("%s=%t", opt.sqlKey, val))
valStr := "FALSE"
if val := v.(bool); val {
valStr = "TRUE"
}
createOpts = append(createOpts, fmt.Sprintf("%s=%s", opt.sqlKey, valStr))
}
dbName := d.Get("name").(string)

Loading…
Cancel
Save