Skip to content

Commit

Permalink
fix: compare default_transaction_read_only with uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
iwpnd committed Feb 17, 2024
1 parent 6258da4 commit 98bc702
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provider/postgis/postgis.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ func (opts *DBConfigOptions) GetRuntimeParams() map[string]string {
// as per https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-READ-ONLY
// default_transaction_read_only accepts boolean, and is not set by default
// hence if OFF, we do not add it to RuntimeParams
if opts.DefaultTransactionReadOnly != "" && opts.DefaultTransactionReadOnly != "OFF" {
pr["default_transaction_read_only"] = opts.DefaultTransactionReadOnly
if opts.DefaultTransactionReadOnly != "" && strings.ToUpper(opts.DefaultTransactionReadOnly) != "OFF" {
pr["default_transaction_read_only"] = strings.ToUpper(opts.DefaultTransactionReadOnly)
}

return pr
Expand Down

0 comments on commit 98bc702

Please sign in to comment.