add_user_read_access()
fails for usernames requiring double quotes
#30
Labels
bug
Something isn't working
Issue
For database usernames that must be double-quoted in a PostgreSQL expression (e.g.,
usr-abc
would require a statement such asGRANT SELECT ON ALL TABLES IN SCHEMA public TO "usr-abc";
, theadd_user_read_access()
function is currently failing.The expression is currently being created with single quotes instead of the double quotes required by PostgreSQL:
Proposed Solution
Wrap the
username
inDBI::SQL()
before passing it toglue::glue_sql()
, and provide double-quotes around the {glue} string, i.e.:The text was updated successfully, but these errors were encountered: