Olá,

Outra possibilidade seria: select datname,numbackends from pg_stat_database;

[]s

2008/11/7 Osvaldo Kussama <[EMAIL PROTECTED]>:
> 2008/11/7, Alisson Viegas | Acsiv Sistemas <[EMAIL PROTECTED]>:
>> Olá pessoal.
>> Há alguma função para ser quantos usuários estão conectados ao banco?
>>
>
>
> pg_stat_activity?
> "One row per server process, showing database OID, database name,
> process ID, user OID, user name, current query, query's waiting
> status, time at which the current transaction and current query began
> execution, time at which the process was started, and client's address
> and port number. The columns that report data on the current query are
> available unless the parameter track_activities has been turned off.
> Furthermore, these columns are only visible if the user examining the
> view is a superuser or the same as the user owning the process being
> reported on."
> http://www.postgresql.org/docs/current/interactive/monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE
>
> Osvaldo
> _______________________________________________
> pgbr-geral mailing list
> pgbr-geral@listas.postgresql.org.br
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>



-- 
João Paulo
www.dextra.com.br/postgres
PostgreSQL
_______________________________________________
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Reply via email to