3

设置 guest_user=admin 后,我已被锁定在仙人掌之外 :( 所以我正在尝试恢复我的访问权限

cacti=# select * from settings;
           name            | value
-------------------------------------------
 auth_method               | 1
 guest_user                | admin

当我尝试运行查询时:

UPDATE settings SET guest_user = 'No User' WHERE guest_user = 'admin';

我得到错误:

cacti=# UPDATE settings SET guest_user = 'No User' WHERE guest_user = 'admin';
ERROR:  column "guest_user" does not exist
LINE 1: UPDATE settings SET guest_user = 'No User' WHERE guest_user ...

数据库是 postgres,我是新手。(这是我第一次使用它:-))

4

1 回答 1

9

Try

UPDATE settings SET value = 'No User' WHERE name = 'guest_user'; 

because the column names are name and value

于 2012-07-08T20:50:03.470 回答