I'm having difficulty modifying a postgres user that contains a dash in its name - I've run into this problem several times, but can never find the answer (no matter how much googling I do!).
osm=# grant all on osm_polygon_view to www-data;
ERROR: syntax error at or near "-"
LINE 1: grant all on osm_polygon_view to www-data;
^
I have tried just about every permutation of escape characters and quotes, and still can't get this to work. I have also encountered this when trying to change www-data password.