Обсуждение: data from system tables.

Поиск
Список
Период
Сортировка

data from system tables.

От
Carol Walter
Дата:
Hello,

We recently began giving our users a ten connection limit.  The are
some accounts that have no limit.  Some of these should have no limit
because they're system accounts, but others are just users that were
created before we started the limit.  Is there a psql command that I
can run with a "where" clause that will let me get a list of everyone
who has no connection limit?

Carol

Re: data from system tables.

От
Tom Lane
Дата:
Carol Walter <walterc@indiana.edu> writes:
> We recently began giving our users a ten connection limit.  The are
> some accounts that have no limit.  Some of these should have no limit
> because they're system accounts, but others are just users that were
> created before we started the limit.  Is there a psql command that I
> can run with a "where" clause that will let me get a list of everyone
> who has no connection limit?

Sure, look into pg_authid for negative rolconnlimit entries.

            regards, tom lane

Re: data from system tables.

От
Michael Fuhr
Дата:
On Mon, Mar 26, 2007 at 04:45:01PM -0400, Carol Walter wrote:
> We recently began giving our users a ten connection limit.  The are
> some accounts that have no limit.  Some of these should have no limit
> because they're system accounts, but others are just users that were
> created before we started the limit.  Is there a psql command that I
> can run with a "where" clause that will let me get a list of everyone
> who has no connection limit?

Look at the SQL that psql executes for its \d commands:

\set ECHO_HIDDEN
\du

See also the "System Catalogs" chapter in the documentation for the
version you're running.  Here's the link for 8.2:

http://www.postgresql.org/docs/8.2/interactive/catalogs.html

--
Michael Fuhr