Re: database session variables

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Steve Atkins <steve(at)blighty(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: database session variables
Date: 2002-10-02 04:22:36
Message-ID: 200210020422.g924Ma619104@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Steve Atkins wrote:
> On Wed, Oct 02, 2002 at 01:48:46PM +1200, Mark Wilson wrote:
> > Thanks Martijin,
> >
> > It sounds like the process_id is the 'correct' name for what I was calling
> > session_id, and is what I want. To answer your question, Oracle lets you
> > have session specific variables, via package variables.
> >
> > Now the next step is how to get access to process_id. I am currently
> > running PostgreSQL version 7.2.1.
> >
> > "select procpid from pg_stat_activity;" seems to return information for all
> > sessions (or 'processes').
> >
> > Is backend_pid() or pg_stat_get_backend_pid() the correct call? Neither of
> > them seem to exist in my database. If they are correct, how do I install
> > them?
>
> Take a look at contrib/miscutil - the C module there gives you the
> SQL function backend_pid().

backend_pid() is new in 7.3beta.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-10-02 04:57:00 Re: database session variables
Previous Message Justin Clift 2002-10-02 04:21:56 Re: data replication