On Fri, 5 Nov 2004 08:27:58 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> 
> I'm looking for the equivalent in postgresql to the v$session variables in
> Oracle. In particular, I need to convert the following statement: 
> 
> select s.program, s.machine into :New.app_name,:New.comp_name from v$session
> s where s.audsid=userenv('SESSIONID'); 

You want basically this information then:

SQL> select  s.program, s.machine from v$session s where
s.audsid=userenv('SESSIONID');

PROGRAM
------------------------------------------------
MACHINE
----------------------------------------------------------------
[EMAIL PROTECTED] (TNS V1-V3)
linux

There's no direct equivalent of v$session in PostgreSQL, and I don't
know any way of determining the client program name (AFAIK). More
information about monitoring user activity can be found e.g. here:
http://www.postgresql.org/docs/current/static/monitoring.html

Ian Barwick
[EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to