Drop the optional WITH token from CREATE ROLE. (#14864)

Fixes: #11273
This commit is contained in:
Sean Chittenden 2017-05-31 11:10:56 -07:00 committed by Paul Stack
parent 3d293d413c
commit 1ab22e1dba
1 changed files with 3 additions and 1 deletions

View File

@ -236,7 +236,9 @@ func resourcePostgreSQLRoleCreate(d *schema.ResourceData, meta interface{}) erro
roleName := d.Get(roleNameAttr).(string)
createStr := strings.Join(createOpts, " ")
if len(createOpts) > 0 {
createStr = " WITH " + createStr
// FIXME(seanc@): Work around ParAccel/AWS RedShift's ancient fork of PostgreSQL
// createStr = " WITH " + createStr
createStr = " " + createStr
}
query := fmt.Sprintf("CREATE ROLE %s%s", pq.QuoteIdentifier(roleName), createStr)