Skip to content

Learning of FK-constraint on Postgres fails for non-owner of the relation #1879

Open
@nbenn

Description

@krlmlr Could you maybe comment on

WHERE pg_has_role(x.tblowner, 'USAGE'::text)

This requires the role issuing the query to have USAGE privileges for the role that owns the relation for the corresponding FK-constraint to be picked up by dm_meta_raw(). Admittedly, I'm fairly new to the topic of DB access privileges, but this seems unnecessarily restrictive. Couldn't you easily find yourself in the situation where the user/role owning theses objects is much more capable than the user/role trying to "learn" them?

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions