From: | Limin Liu <limin(at)pumpkinnet(dot)com> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Richard Huxton <dev(at)archonet(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: display temp table structure? |
Date: | 2001-03-13 17:16:33 |
Message-ID: | 3AAE55F1.6DCF1306@pumpkinnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Bruce Momjian wrote:
> > 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?
It seems that client application has to keep a mapping for all the temporary
tables it created. I wonder if that's the case, how can you later implement
\d temp_table_name (in the TODO list)?
If backend does not keep temp_table_name, this looks like somthing impossible to
do (to me). (I hope my question makes sense.)
BTW, thanks for the workaround.
>
> > > 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();
>
--
LM.Liu
From | Date | Subject | |
---|---|---|---|
Next Message | mike | 2001-03-13 17:22:03 | database schema designer |
Previous Message | David Wall | 2001-03-13 17:15:42 | Re: Data type for storing images? |