From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Dennis <pg-user@calico-consulting.com>
Cc: postgres SQL <pgsql-sql@postgresql.org>
Subject: Re: lifetime of temp schema versus compiled image of plpgsql proc
Date: Thu, 22 Apr 2004 19:46:00 -0400 (EDT)
Message-ID: <200404222346.i3MNk0b24607@candle.pha.pa.us> (raw)
In-Reply-To: <courier.40881D1C.0000705D@wolverine.lercnetworks.com>
There is an FAQ item on this --- use EXECUTE.
---------------------------------------------------------------------------
Dennis wrote:
>
> Hi,
>
> this is pg 7.4.1
>
> I am opening a connection to postgres
> starting a transaction
> executing a plpgsql function that creates temp tables
> executing a plpgsql function that populates the temp tables
> querying the temp table
> closing the transaction
>
> then on the same connection, I open a transaction, execute a plpgsql
> function that populates the temp tables and the function bombs with this
> error message:
>
> ERROR: schema "pg_temp_8" does not exist
>
> I am not specifying "on commit" when creating the temp tables. Are temp
> tables created in a transaction discarded when the transaction ends?
>
> I'm not explicitly referencing pg_temp_8 in my stored function.
>
> Can someone explain what is going on? Have I given enough information?
>
> dennis
> pg-user at calico dash consulting dot com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
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: pgman@candle.pha.pa.us, pg-user@calico-consulting.com
Subject: Re: lifetime of temp schema versus compiled image of plpgsql proc
In-Reply-To: <200404222346.i3MNk0b24607@candle.pha.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