1
vote
2answers
66 views

Why can a new user select from any table?

When I create a user in Postgres, create user test with password 'test'; The user ends up being able to connect to every database in the instance. The user can also select from any table: # psql ...
0
votes
1answer
68 views

How to grant select on a view … based on IP adress?

I wonder if it's possible to allow a client A to "see" some data in a view while allowing any other clients, namely B and C, to see ALL data from the same view. The distinction between A, B and C ...
2
votes
2answers
355 views

How to get all roles that a user is a member of (including inherited roles)?

Let's say I have two Postgresql database groups, "authors" and "editors", and two users, "maxwell" and "ernest". create role authors; create role editors; create user maxwell; create user ernest; ...
2
votes
1answer
138 views

How to avoid large joins when determining which rows a user is authorized for?

Typical wep app situation: you have logged in users querying for resources exposed through an API. As a hypothetical example, company administrators quering for their employees' time sheets: company ...
1
vote
2answers
405 views

Tables accessed during last periods in postgresql

I want to check that which tables are updated during the last period or say in descending order of accesstime of tables, then how can I view that for postgresql ?