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                                           [EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

Reply via email to