Re: aliases for temp tables....

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alfonso Peniche <alfonso@iteso.mx>
Cc: pgsql-general@postgresql.org
Date: 2001-02-18T05:36:34Z
Lists: pgsql-general
Alfonso Peniche <alfonso@iteso.mx> writes:
> I've been looking everywhere and I can't find this:
> Everytime I create a temp table (Thanx Tom) within a procedure, a table
> named like pg_temp.###.# is created (I know this is MY temp table). How
> can I know the name (or alias) for this table so that I can, later on,
> check if it already exists.

AFAIK there is no way to retrieve the temp-table name mapping from the
backend.  Sorry ...

When we implement schemas (hopefully for 7.2) perhaps it will be
possible to reimplement temp tables in a slightly less klugy way,
so that this sort of problem goes away.

			regards, tom lane