Re: function to return pg_user.usesysid

Поиск
Список
Период
Сортировка
От Kevin Brown
Тема Re: function to return pg_user.usesysid
Дата
Msg-id 20030208110934.GB1833@filer
обсуждение исходный текст
Ответ на Re: function to return pg_user.usesysid  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
Neil Conway wrote:
> On Fri, 2003-02-07 at 07:03, Dr. Ernst Molitor wrote:
> > Hm, by the way, what about adding a function like current_userid to the
> > core functionality of PostgreSQL?
> 
> What exactly would this do that couldn't be done by just querying
> pg_user directly?
> 
> SELECT usesysid FROM pg_user WHERE usename = CURRENT_USER;

The function would be maintained and would work no matter what changes
to the underlying tables were made.

Not that such changes are terribly likely for this case, mind you.

Are there any situations in which it would be useful to deny access to
certain system tables, like pg_user?  Would doing so automatically
prevent any users who were under such restrictions from doing anything
useful?  If such a thing is possible and potentially useful, then it's
another reason for the function Dr. Molitor mentioned.


-- 
Kevin Brown                          kevin@sysexperts.com


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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: function to return pg_user.usesysid
Следующее
От: Samuel Sieb
Дата:
Сообщение: UNIQUE not unique with inheritance (workaround?)