Re: Column Privileges: NULL instead of permission denied

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Column Privileges: NULL instead of permission denied
Дата
Msg-id 20110919211338.GL12765@tamriel.snowman.net
обсуждение исходный текст
Ответ на Column Privileges: NULL instead of permission denied  (Matthew Hawn <matthewh@donaanacounty.org>)
Ответы Re: Column Privileges: NULL instead of permission denied
Список pgsql-general
* Matthew Hawn (matthewh@donaanacounty.org) wrote:
> I have a table with privileged data that is restricted using column level
> permissions.  I would like to have single query  that returns data from the
> table.  If the user has permission, it should return the data but return
> NULL if the user does not have permission.   I do not want to create
> separate queries in my application for different users.

I think you'll have to build the query in the application to either have
the NULL or not have it.  If you try to reference it in the query, PG is
going to give you that permission denied error and I don't think there's
an easy way to change that (and I'm not sure that we'd want to...).

    Thanks,

        Stephen

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Matthew Hawn
Дата:
Сообщение: Column Privileges: NULL instead of permission denied
Следующее
От: Tim Uckun
Дата:
Сообщение: Re: Getting TOAST errors