Question : postgresql check if role exists
Answered by : emmanuel-mahuni
psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='USR_NAME'"
Source : https://stackoverflow.com/questions/8546759/how-to-check-if-a-postgres-user-exists | Last Update : Fri, 27 May 22