From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christoph Haller <ch@rodos.fzk.de>
Cc: pgsql-sql@postgresql.org
Cc: m.papper@fantastic.com
Subject: Re: Finding if a temp table exists in the current connection
Date: Fri, 04 Apr 2003 09:58:24 -0500
Message-ID: <5648.1049468304@sss.pgh.pa.us> (raw)
In-Reply-To: <3E8D6980.5060308@rodos.fzk.de>
References: <3E8D6980.5060308@rodos.fzk.de>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, ch@rodos.fzk.de, m.papper@fantastic.com
Subject: Re: Finding if a temp table exists in the current connection
In-Reply-To: <5648.1049468304@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox