Is there a one-liner that grants the SELECT permissions to a new user postgresql?
Something that would implement the following pseudo-code:
GRANT SELECT ON TABLE * TO my_new_user;
|
Is there a one-liner that grants the SELECT permissions to a new user postgresql? Something that would implement the following pseudo-code:
| |||
|
feedback
|
|
My (non-one-liner) solution:
Run from the privileged user, it worked like a charm. | |||||
feedback
|
|
I thought it might be helpful to mention that, as of 9.0, postgres does have the syntax to grant privileges on all tables (as well as other objects) in a schema:
Here's the link. | |||
|
feedback
|
|
This can be done with a two-step process.
| |||
|
feedback
|
|
one way to fix this is to write a stored procedure. unfortunately there is no "grant everything to all tables" command or so. you really need a procedure or some external shell script maybe to make this work. | |||
|
feedback
|