(info Privileges)
| 165 | } |
| 166 | |
| 167 | func (r *Remote) ChangePrivileges(info Privileges) error { |
| 168 | super := "SUPERUSER" |
| 169 | if !info.SuperUser { |
| 170 | super = "NOSUPERUSER" |
| 171 | } |
| 172 | return r.ExecSQL(fmt.Sprintf("ALTER USER \"%s\" WITH %s", info.Username, super), info.Timeout) |
| 173 | } |
| 174 | |
| 175 | func (r *Remote) ChangePassword(info PasswordChangeInfo) error { |
| 176 | return r.ExecSQL(fmt.Sprintf("ALTER USER \"%s\" WITH ENCRYPTED PASSWORD '%s'", info.Username, info.Password), info.Timeout) |