I'm having a problem with a script that will theoretically grant permission to a specific group in a postgresql database.
Following script:
#!/bin/bash
su postgres -l -c "psql -c 'grant all on database teste_semanal to grp.teste_own;'"
What happens, when I run the script it gives error at the point, a syntax error:
ERROR: syntax error at or near "." LINE 1: grant all on database teste_semanal to group grp.teste ...
If I swap the user or group by a name without a dot, test example works normal. I would like to know if anyone knows how I do for this dotted user.