문제

As the title already says: What privileges are required to inherit from a table?

I want to create two schemas core and dev where core has a table named Companies with coreuser as its owner.

Another user, we call it devuser has all privileges to access the devschema. How can he inherit from the table core.Companies with as few privileges as possible, not even select privileges in the coreschema?

도움이 되었습니까?

해결책

In order to create a table that inherits from core.companies, devuser must be the owner of core.companies. Also, devuser must have usage privileges on the schema "core".

I couldn't find this in the docs. I determined the answer through testing.

You might be able to work around this by having coreuser create child tables in the dev schema, then either grant privileges to devuser or change ownership to devuser. I think devuser will need some privileges on core.companies in order to update data, but I could be wrong.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top