Re: Drop Default Privileges?

2018-06-19 Thread Louis Battuello
> On Jun 19, 2018, at 11:38 AM, Fabio Pardi wrote: > > Hi Louis, > > I think 'alter user' can do the job for you. > > https://www.postgresql.org/docs/current/static/sql-alteruser.html > > Else, as alternative: before running pg_restore, you could edit the dump and > replace the string 'ROLE

Drop Default Privileges?

2018-06-19 Thread Louis Battuello
Is it possible to drop default privileges? I’m attempting to run a pg_restore into an RDS instance, which doesn’t have a “postgres” user. I encounter many messages like so: ALTER DEFAULT PRIVILEGES... pg_restore: [archiver (db)] Error from TOC entry 10182; 826 253752252 DEFAULT ACL DEFAULT PRI

Re: Foreign Key Validation after Reference Table Ownership Change

2018-03-21 Thread Louis Battuello
> On Mar 21, 2018, at 2:36 PM, David G. Johnston wrote: > > And altering an owner of a table to one lacking usage and create permissions > on the schema is possible but unadvisible. > > David J. Exactly. The cause of my mistake was changing the REFERENCED table ownership to a role without g

Re: Foreign Key Validation after Reference Table Ownership Change

2018-03-21 Thread Louis Battuello
> > The point is you can't resolve a name like "schema_1.something" unless > you have USAGE on schema_1. So the RI-checking query, which is run as > the owner of the table, fails at parse time. That certainly makes sense for user_2 that owns the reference table and is blocked by not having usa

Re: Foreign Key Validation after Reference Table Ownership Change

2018-03-21 Thread Louis Battuello
Agreed. It would certainly make sense that user_2 have usage on the schema in order to operate against the table owned by user_2. I just found it confusing that the discrepancy would cause an issue for user_1, which had all necessary privileges on the schema and references on the reference table