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

Popular posts from this blog

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -