P
P
pqgg7nwkd42017-08-07 15:36:26
PostgreSQL
pqgg7nwkd4, 2017-08-07 15:36:26

How to give SELECT access to all columns of all tables except one column?

If database: 150 tables. Among them is a user table with a password field. It is necessary to create such a user who would be able to make SELECT queries to all tables and all columns, except for user.password. Moreover, he must have access to the user table.
Is it possible to do this without listing all tables? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
x67, 2017-08-07
@x67

you can create a function that will return this table without the required field, then prohibit the user from using the table, but allow the user to use the function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question