Reputation: 13610
I would like to drop a role that contains this name:
http://bphppgadmin.kattare.com/phppgadmin/vagrant
I perform query from terminal and Postgresql throws syntax error.
DROP ROLE http://bphppgadmin.kattare.com/phppgadmin/vagrant;
ERROR: syntax error at or near ":"
LINE 1: DROP ROLE http://bphppgadmin.kattare.com/phppgadmin/vagrant;
Anyone knows how to escape colon? I tried several solution however no luck so far.
Upvotes: 1
Views: 1593
Reputation:
Identifiers with non-standard characters need to be enclosed in double quotes:
DROP ROLE "http://bphppgadmin.kattare.com/phppgadmin/vagrant";
More details in the manual:
http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
Upvotes: 3