I have a bit of a funny situation in Amazon Redshift where I have a user X who has grant select on all tables in schema public, but once a new table is created, this grant doesn't seem to apply to the new table. Is this normal behaviour? If yes, how does one deal with it such that the schema level grants are maintained. Thank you.
相关问题
- How to generate 12 digit unique number in redshift
- How to handle quoted values in AWS Redshift unload
- SQL Server 2005 - Granting permission to create st
- psycopg2.ProgrammingError: syntax error at or near
- how can aws glue job upload several tables in reds
相关文章
- in redshift postgresql can I skip columns with the
- Redshift table update with join
- How to get a list of UDFs in Redshift?
- Sql Alchemy cannot run inside a transaction block
- Alternatives for Athena to query the data on S3
- Copy a datetime with the format rfc822 into redshi
- How should records be formatted for AWS Kinesis Fi
- Return elements of Redshift JSON array on separate
In Redshift tables and views do not automatically inherit the permissions of their parent schema. Your newly created tables are only accessible to the user who created them, and the superuser.
In a recent patch to Redshift a new feature to grant default privileges was implemented that addresses this issue.
Alter Default Privileges
The following code snippet will grant select privileges only for all future tables in the sales schema to the sales_admin group. If you want this to apply to existing tables in a schema you will need to combine it with a second grant statement.
When we first spotted new tables not appearing in our reporting tool, I discovered a quick workaround is to re-execute the following SQL statement for the groups/users impacted:
Executing the following command as super user (master):
will allow reporting_user to select data from all future tables created by staging_user in schema staging.
This is a normal behavior. Only the object owner/superuser have permission to use the object by default.
http://docs.aws.amazon.com/redshift/latest/dg/r_Privileges.html
You can add
grant
command to yourcreate table
statement and grant needed privileges for the user.