Skip to content

Commit 073041e

Browse files
Merge pull request #4 from Leafly-com/update-from-upstream
Update from upstream
2 parents cc331e3 + 8840baf commit 073041e

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
## Unreleased
22

3+
## 1.17.1 (August 19, 2022)
4+
5+
FIX:
6+
7+
* `provider`: Fix segfault on bad credentials when `expected_version` is defined - @cyrilgdn
8+
[#242](https://github.com/cyrilgdn/terraform-provider-postgresql/pull/242)
9+
10+
## 1.17.0 (August 19, 2022)
11+
12+
FEATURES
13+
14+
* `postgresql_function`: Add `database` parameter - @LucasBoisserie
15+
[#216](https://github.com/cyrilgdn/terraform-provider-postgresql/pull/216)
16+
17+
* `postgresql_role`: Support of ALTER ROLE ... SET ROLE- @kostiantyn-nemchenko
18+
[#209](https://github.com/cyrilgdn/terraform-provider-postgresql/pull/209)
19+
20+
FIX:
21+
22+
* `postgresql_publication`: Fix unordered tables - @nguyenhoaibao
23+
[#219](https://github.com/cyrilgdn/terraform-provider-postgresql/pull/219)
24+
325
## 1.16.0 (May 8, 2022)
426

527
FEATURES:

postgresql/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func sliceContainsStr(haystack []string, needle string) bool {
235235
// allowedPrivileges is the list of privileges allowed per object types in Postgres.
236236
// see: https://www.postgresql.org/docs/current/sql-grant.html
237237
var allowedPrivileges = map[string][]string{
238-
"database": {"ALL", "CREATE", "CONNECT", "TEMPORARY", "TEMP"},
238+
"database": {"ALL", "CREATE", "CONNECT", "TEMPORARY"},
239239
"table": {"ALL", "SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER"},
240240
"sequence": {"ALL", "USAGE", "SELECT", "UPDATE"},
241241
"schema": {"ALL", "CREATE", "USAGE"},

postgresql/resource_postgresql_database.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ func createDatabase(db *DBConnection, d *schema.ResourceData) error {
125125
// Take a lock on db currentUser to avoid multiple database creation at the same time
126126
// It can fail if they grant the same owner to current at the same time as it's not done in transaction.
127127
lockTxn, err := startTransaction(db.client, "")
128+
if err != nil {
129+
return err
130+
}
128131
if err := pgLockRole(lockTxn, currentUser); err != nil {
129132
return err
130133
}

0 commit comments

Comments
 (0)