Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 5307C1337BBA for ; Wed, 9 Mar 2011 05:07:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 94312-04 for ; Wed, 9 Mar 2011 09:07:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 8C68E1337B8C for ; Wed, 9 Mar 2011 05:07:48 -0400 (AST) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PxFMw-0004oM-Et for pgsql-admin@postgresql.org; Wed, 09 Mar 2011 10:07:46 +0100 Received: from 217.31.70.82 ([217.31.70.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Mar 2011 10:07:46 +0100 Received: from chris by 217.31.70.82 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Mar 2011 10:07:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Christian Ullrich Subject: Re: How to get schema name in which TEMPORARY table is created? Date: Wed, 09 Mar 2011 10:07:35 +0100 Lines: 12 Message-ID: References: <005201cbdd99$8930e990$9b92bcb0$@com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 217.31.70.82 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: <005201cbdd99$8930e990$9b92bcb0$@com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.746 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_NUMERIC_HELO=1.164, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/92 X-Sequence-Number: 36964 * Gnanakumar wrote: > We're using PostgreSQL v8.2.3. > > How do I get the schema name in which TEMPORARY table is created using > "CREATE TEMP TABLE mytable ...." syntax? SELECT nspname FROM pg_namespace WHERE oid = pg_my_temp_schema(); I don't have an 8.2.3 lying around, but git says that function is in there.