On Thu, 2002-05-02 at 05:33, Tom Lane wrote: > "Nigel J. Andrews" <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html