How to check if provided string is a valid name in postgres ? I know that it is possible to use any string as name when it is quoted, but I want to know is string can be used without quotes i.e. as role name. I have idea to do it like this: BEGIN; CREATE ROLE ; ROLLBACK; Is is good idea ?