pandaZW pandaZW - 1 month ago 6
Linux Question

Postgres doesn't ignore upper and lower letters

My unix user is

Ru
. And I found I have no privilege. So,I use
\du
and found a role named
ru
.

After I dropped it, I found this secret.

postgres=# ALTER role Ru with superuser;
ERROR: role "ru" does not exist


How can I do with this?

I know this is a
badname
.


  • -


Answer

This should work!

ALTER ROLE 'Ru' WITH SUPERUSER; --whatever privilege you want to give
Comments