I currently log in to PostgreSQL using psql -U postgres
. How do I rename postgres
user to root
?
If I am already logged in as postgres
then trying ALTER USER postgres RENAME TO root
will say ERROR: session user cannot be renamed
.
Is it possible to rename the user without logging as postgres
user? I don't think I have any other superuser since this is a fresh install of PostgreSQL.
By the way, I am running Gentoo on Amazon EC2.
postgres
user in Linux have to match with thepostgres
role in the database? I log in asroot
so I just want to typepsql -d something
to log in as oppose topsl -U postgres -d something
. – Erlindaerline