From 3779dfffa9a13e3061414c26871e8714f5fa2c5e Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Mon, 5 Sep 2016 23:41:24 -0700 Subject: [PATCH] Use a string instead of the `%t` modifier for printing a bool in SQL --- .../providers/postgresql/resource_postgresql_database.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/builtin/providers/postgresql/resource_postgresql_database.go b/builtin/providers/postgresql/resource_postgresql_database.go index 5602857667..48d05cfd4c 100644 --- a/builtin/providers/postgresql/resource_postgresql_database.go +++ b/builtin/providers/postgresql/resource_postgresql_database.go @@ -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)