Who can do what
pg_privilegesInspect PostgreSQL access rights by object or role: view who can act on tables, schemas, functions, sequences, or databases, plus inherited, PUBLIC, owner, and default privileges.
Instructions
Show access rights, in one of two ways. With object: who can do what on that
table (and its columns), schema, function, sequence or database, owner and PUBLIC
included. With role: everything that role may do (granted directly, through roles it
inherits, or to PUBLIC), the objects it owns and its default privileges.
kind says what object names (default table, views included); a function can be
schema.name or name(argument types) when overloaded. Pass role="public" to see
what every role can do. Pass one of object and role, not both. A superuser
bypasses all of these checks; the answer says so.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pg_privileges"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | table | |
| role | No | ||
| limit | No | ||
| object | No | ||
| connection | No |