我目前使用psql -U postgres
. 如何将postgres
用户重命名为root
?
如果我已经登录,postgres
那么尝试ALTER USER postgres RENAME TO root
会说ERROR: session user cannot be renamed
。
是否可以重命名用户而不以用户身份登录postgres
?我认为我没有任何其他超级用户,因为这是 PostgreSQL 的全新安装。
顺便说一句,我在 Amazon EC2 上运行 Gentoo。