可以直接写到系统数据库里。你可以用这个命令先看看:
#su - postgres ----进到数据库的超级用户
$psql template1
psql template1
Welcome to psql 7.3.5, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
template1=# select * from pg_user;
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig
---------+----------+-------------+----------+-----------+----------+----------+-----------
postgres | 1 | t | t | t | ******** | |
你可以直接用update对pg_shadow表进行操作。