| From: | Hannu Krosing <hannu(at)tm(dot)ee> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: Schemas: status report, call for developers | 
| Date: | 2002-05-02 07:25:03 | 
| Message-ID: | 1020324303.31615.19.camel@taru.tm.ee | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers pgsql-interfaces | 
On Thu, 2002-05-02 at 05:33, Tom Lane wrote:
> "Nigel J. Andrews" <nandrews(at)investsystems(dot)co(dot)uk> writes:
> > So, how does one determine the current schema for temporary tables,
> > i.e. what name would be in search_path if it wasn't implicitly included?
> 
> The temp schema is pg_temp_nnn where nnn is your BackendId (PROC array
> slot number).  AFAIK there isn't any exported way to determine your
> BackendId from an SQL query.
The non-portable way on Linux RH 7.2 :
>create function getpid() returns int as '/lib/libc.so.6','getpid' language 'C';
CREATE
>select getpid()
 getpid1 
---------
   31743
(1 row)
I think that useful libc stuff things like this should be put in some
special schema, initially available to superusers only.
perhaps LIBC.GETPID()
----------
Hannu
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Arthur@LinkLine.com | 2002-05-02 07:27:56 | mV database tools | 
| Previous Message | Arthur@LinkLine.com | 2002-05-02 07:05:20 | mV database tools | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ian Barwick | 2002-05-02 07:37:13 | Re: Schemas: status report, call for developers | 
| Previous Message | Tom Lane | 2002-05-02 03:33:12 | Re: Schemas: status report, call for developers |