Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id C61E72E30B4 for ; Sun, 30 Dec 2007 04:44:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 29900-06 for ; Sun, 30 Dec 2007 04:44:45 -0400 (AST) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.185]) by postgresql.org (Postfix) with ESMTP id ABD802E30BD for ; Sun, 30 Dec 2007 04:44:47 -0400 (AST) Received: by fk-out-0910.google.com with SMTP id b27so5362380fka.3 for ; Sun, 30 Dec 2007 00:44:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=z54hPRwEGRIU3tpMBi4Nnagmb+S0gN4Au95ORbV1Jbs=; b=eER244U4XKVNuLT4FX0UnvK5k7kae+S5aLExIUzCsGD7bBx0sS1maodztSIGNzQYK1yonxv+ggLFjCkJqz0uPvAIkbZhIUVVQxz0e+Q/rdL0htNxUIrm1rO9YXEkLqEgh24xhD7/X3G1S4N1e3D3qI1Z+iMN3bz5twwuz0y6Ulo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RJQxAsGfpbTSU5UfvRONzaRQ9DpgSKt902VK5rp0V0YHjKujoaPmBJ65xtzVmbnOKJn3LxIStJuOoxYD+EJpFBh+0JbVlTbU2WXHd2WIQZPlCmBnnqPND58aKyP/znxsY+kCGEUmH4s1ISHgrjPvxYfkJB4SY4ihEIowFqOJ//o= Received: by 10.78.175.14 with SMTP id x14mr10006819hue.7.1199004286075; Sun, 30 Dec 2007 00:44:46 -0800 (PST) Received: by 10.78.35.10 with HTTP; Sun, 30 Dec 2007 00:44:46 -0800 (PST) Message-ID: <162867790712300044w78a4e633kaccc5e9e4d15dd28@mail.gmail.com> Date: Sun, 30 Dec 2007 09:44:46 +0100 From: "Pavel Stehule" To: "Erik Jones" Subject: Re: temp table existence Cc: "Marcin Krawczyk" , pgsql-sql@postgresql.org In-Reply-To: <429CBCF5-217F-49A9-959B-9D20CA7CC64C@myemma.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <95f6bf9b0712291116lc3c1df0o978922176e98f8d7@mail.gmail.com> <162867790712291133n1bb6a6fcqeb1234df1576dd8c@mail.gmail.com> <95f6bf9b0712291316x31ae9c8er80fb60a7db4aaca6@mail.gmail.com> <429CBCF5-217F-49A9-959B-9D20CA7CC64C@myemma.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/159 X-Sequence-Number: 29851 Hello On 30/12/2007, Erik Jones wrote: > > On Dec 29, 2007, at 3:16 PM, Marcin Krawczyk wrote: > > > I just realized something... my bad. It will work since TRUNCATE > > removes only table from current session. > > If the table exists and you're going to TRUNCATE it before using it, > you could just use DROP TABLE IF EXISTS and then create it. I don't > know, that feels cleaner to me than TRUNCATEing a table that might > not be available to the session. > if you drop temp table in session, you lost all prepared statements related to table. before 8.3 it means runtime error, now only less efectivity. > Erik Jones > > Software Developer | Emma(R) > erik@myemma.com > 800.595.4401 or 615.292.5888 > 615.292.0777 (fax) > > Emma helps organizations everywhere communicate & market in style. > Visit us online at http://www.myemma.com > > >