Christoph Haller <ch@rodos.fzk.de> writes:
> It looks like they are created in name spaces called "pg_temp_<N>,
> where N is simply a connection counter.
Right. If you are trying to find out which N applies to your session,
here is one way:
regression=# select current_schemas(true); current_schemas
---------------------{pg_catalog,public}
(1 row)
regression=# create temp table z(f1 int);
CREATE TABLE
regression=# select current_schemas(true); current_schemas
-------------------------------{pg_temp_2,pg_catalog,public}
(1 row)
regards, tom lane