Kovacs Zoltan wrote:
> On Tue, 5 Mar 2002, Josh Berkus wrote:
>
> > Kovacs,
> >
> > > Is there an easier method?
> >
> > Much easier. Take a look at $PGDATA/postmaster.pid
>
> I mean the current pid number of the actual connection. Not the postmaster
> process, I need the pid of the currently running postgres. :-)
You are going to love this one:test=> create function getpid() returns int as '/shlib/libc.so', 'getpid'
languagec;CREATEtest=> select getpid(); getpid -------- 2971(1 row)
You may need to modify the libc.so path.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026