PostgreSQL - how to drop a user with hypen in his username -
i can't seem execute drop user username if username contains hypens (-), example user-name.
i tried straightforward drop user user-name, drop user 'user-name' i'm getting: error: syntax error @ or near "'user-name'".
i guess need use kind of escaping or something, can't find it, please help.
identifiers need quoted using double quotes, single quotes string literals:
drop user "user-name"; more details in manual: http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#sql-syntax-identifiers
Comments
Post a Comment