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:
|
|||
|
|
|
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. |
|||
|
|
|
My (non-one-liner) solution:
Run from the privileged user, it worked like a charm. |
|||||
|
|
This can be done with a two-step process.
|
|||
|
|
|
soy Wilson Del Rosario trabajo con postgres 8.4 y para dar todos los privilegios a un usuario hago lo siguiente: !/bin/bashfor table in |
|||
|
|
|
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. |
|||
|
|