HF RL Explorer

Task: Check if a PostgreSQL User Exists

Task: Check if a PostgreSQL User Exists: a task in Terminal-Lego-15k (Harbor dataset). You need to create a shell script that checks if a PostgreSQL user (role) exists before attempting to create it. The createuser command in PostgreSQL fails with an error if the role already exists:

Part of PrimeIntellect/Terminal-Lego-15k.