79648194

Date: 2025-06-02 05:22:06
Score: 1
Natty:
Report link

Thank you for pointing out the root of the issue @Lukasz Szozda and @Frank Heikens

In PostgreSQL, unquoted identifiers are automatically folded to lowercase. So, this command:

CREATE ROLE myDatabase_IntegrationServicesAccount LOGIN WITH PASSWORD 'test@12345';

is actually interpreted as :

CREATE ROLE mydatabase_integrationservicesaccount LOGIN WITH PASSWORD 'test@12345';

However, if you explicitly create the role with double quotes, then PostgreSQL preserves the exact case, making the role name case-sensitive.

DROP USER "myDatabase_IntegrationServicesAccount";

This will correctly identify and drop the role with exact casing.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Lukasz
  • User mentioned (0): @Frank
  • Low reputation (0.5):
Posted by: Mihir Saxena