pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedoracle v$session equivalent in postgresql
3+ messages / 2 participants
[nested] [flat]
* oracle v$session equivalent in postgresql
@ 2004-11-03 20:06 stuff@opensourceonline.com
0 siblings, 0 replies; 3+ messages in thread
From: stuff@opensourceonline.com @ 2004-11-03 20:06 UTC (permalink / raw)
To: pgsql-sql
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');
^ permalink raw reply [nested|flat] 3+ messages in thread
* oracle v$session equivalent in postgresql
@ 2004-11-05 15:27 stuff@opensourceonline.com
0 siblings, 1 reply; 3+ messages in thread
From: stuff@opensourceonline.com @ 2004-11-05 15:27 UTC (permalink / raw)
To: pgsql-sql
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');
Any help appreciated
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: oracle v$session equivalent in postgresql
@ 2004-11-05 19:53 Ian Barwick <barwick@gmail.com>
parent: stuff@opensourceonline.com
0 siblings, 0 replies; 3+ messages in thread
From: Ian Barwick @ 2004-11-05 19:53 UTC (permalink / raw)
To: stuff@opensourceonline.com <stuff@opensourceonline.com>; +Cc: pgsql-sql
On Fri, 5 Nov 2004 08:27:58 -0700, stuff@opensourceonline.com
<stuff@opensourceonline.com> 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
----------------------------------------------------------------
sqlplus@linux (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
barwick@gmail.com
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-11-05 19:53 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-03 20:06 oracle v$session equivalent in postgresql stuff@opensourceonline.com
2004-11-05 15:27 oracle v$session equivalent in postgresql stuff@opensourceonline.com
2004-11-05 19:53 ` Ian Barwick <barwick@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox