Skip to content

Commit

Permalink
Merge pull request #4 from Leafly-com/update-from-upstream
Browse files Browse the repository at this point in the history
Update from upstream
  • Loading branch information
wilsonjackson authored Aug 31, 2022
2 parents cc331e3 + 8840baf commit 073041e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
## Unreleased

## 1.17.1 (August 19, 2022)

FIX:

* `provider`: Fix segfault on bad credentials when `expected_version` is defined - @cyrilgdn
[#242](https://github.com/cyrilgdn/terraform-provider-postgresql/pull/242)

## 1.17.0 (August 19, 2022)

FEATURES

* `postgresql_function`: Add `database` parameter - @LucasBoisserie
[#216](https://github.com/cyrilgdn/terraform-provider-postgresql/pull/216)

* `postgresql_role`: Support of ALTER ROLE ... SET ROLE- @kostiantyn-nemchenko
[#209](https://github.com/cyrilgdn/terraform-provider-postgresql/pull/209)

FIX:

* `postgresql_publication`: Fix unordered tables - @nguyenhoaibao
[#219](https://github.com/cyrilgdn/terraform-provider-postgresql/pull/219)

## 1.16.0 (May 8, 2022)

FEATURES:
Expand Down
2 changes: 1 addition & 1 deletion postgresql/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func sliceContainsStr(haystack []string, needle string) bool {
// allowedPrivileges is the list of privileges allowed per object types in Postgres.
// see: https://www.postgresql.org/docs/current/sql-grant.html
var allowedPrivileges = map[string][]string{
"database": {"ALL", "CREATE", "CONNECT", "TEMPORARY", "TEMP"},
"database": {"ALL", "CREATE", "CONNECT", "TEMPORARY"},
"table": {"ALL", "SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER"},
"sequence": {"ALL", "USAGE", "SELECT", "UPDATE"},
"schema": {"ALL", "CREATE", "USAGE"},
Expand Down
3 changes: 3 additions & 0 deletions postgresql/resource_postgresql_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ func createDatabase(db *DBConnection, d *schema.ResourceData) error {
// Take a lock on db currentUser to avoid multiple database creation at the same time
// It can fail if they grant the same owner to current at the same time as it's not done in transaction.
lockTxn, err := startTransaction(db.client, "")
if err != nil {
return err
}
if err := pgLockRole(lockTxn, currentUser); err != nil {
return err
}
Expand Down

0 comments on commit 073041e

Please sign in to comment.