0
I have a little problem in a script that theoretically will give permission to a specific group in a postgresql database.
Follows 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 gives error at the point, a syntax error:
ERROR: syntax error on or near "." ROW 1: Grant all on database teste_weekly to group grp.test...
If I exchange the user or group for a non-stick name, test example works normal.
I wonder if anyone knows how to make this user with point be recognized.
No missing internal double quotes?
...to "grp.teste_own";'"
– Ismael
Not with quotes also gives the same error. It simply is not recognizing the point.
– Guilherme Oliveira
Try to put an scape Grant all on
database teste_semanal to grp\.teste_own
– Roknauta
A similar thing was resolved here in the same way as @Ismael http://stackoverflow.com/questions/2293595/postgresql-escaping-dash-in-username
– Zumo de Vidrio