From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Limin Liu <limin(at)pumpkinnet(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: display temp table structure? |
Date: | 2001-03-13 15:16:56 |
Message-ID: | 200103131516.KAA11387@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Tom Lane wrote:
> >
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > There is no user-visible mapping, though the number is the process id.
> > > You could use that. I think you can get the backend process id somehow,
> > > but I am not sure how. Anyone?
> >
> > If you're using libpq, there is a function to retrieve the backend's PID
> > from the PGconn (PQbackendPID). I don't think any of the other client
> > libraries provide this (yet).
>
> I installed getpid() as a user-defined function (while testing an idea)
> - it seemed to work and I assumed it was the backend pid I was getting.
Yes, that is the _nify_ fix I was thinking about. Use the proper path
for libc and:
CREATE FUNCTION getpid () returns int4 as '/lib/libc.so.6' LANGUAGE 'C';
SELECT getpid();
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Howansky | 2001-03-13 15:18:34 | Re: "critical mass" reached? |
Previous Message | Tom Lane | 2001-03-13 15:09:24 | Re: "critical mass" reached? |