Skip to content

Commit

Permalink
update postgres create user
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Nov 28, 2023
1 parent bf057cc commit b0275d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/dialect_postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (d postgresDialect) CreateUser(tx Tx, ctx context.Context, l *Loader, usern
GRANT SELECT ON ALL TABLES IN SCHEMA public TO %s;
`, user, pass, db, user, user, user, user)
} else {
q = fmt.Sprintf("CREATE USER %s WITH PASSWORD '%s'; GRANT ALL PRIVILEGES ON DATABASE %s TO %s;", user, pass, db, user)
q = fmt.Sprintf("CREATE USER %s WITH PASSWORD %s; GRANT ALL PRIVILEGES ON DATABASE %s TO %s;", user, pass, db, user)
}

_, err := tx.ExecContext(ctx, q)
Expand Down

0 comments on commit b0275d2

Please sign in to comment.