Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 3EB162E0318 for ; Sun, 30 Dec 2007 02:26:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78513-04 for ; Sun, 30 Dec 2007 02:26:46 -0400 (AST) Received: from smtp146.iad.emailsrvr.com (smtp146.iad.emailsrvr.com [207.97.245.146]) by postgresql.org (Postfix) with ESMTP id 62DB12E035B for ; Sun, 30 Dec 2007 02:26:46 -0400 (AST) Received: from relay4.r5.iad.mlsrvr.com (localhost [127.0.0.1]) by relay4.r5.iad.mlsrvr.com (SMTP Server) with ESMTP id 96B35C0C5; Sun, 30 Dec 2007 01:26:45 -0500 (EST) Received: by relay4.r5.iad.mlsrvr.com (Authenticated sender: erik-AT-myemma.com) with ESMTP id 68811C0CF; Sun, 30 Dec 2007 01:26:45 -0500 (EST) In-Reply-To: <95f6bf9b0712291316x31ae9c8er80fb60a7db4aaca6@mail.gmail.com> References: <95f6bf9b0712291116lc3c1df0o978922176e98f8d7@mail.gmail.com> <162867790712291133n1bb6a6fcqeb1234df1576dd8c@mail.gmail.com> <95f6bf9b0712291316x31ae9c8er80fb60a7db4aaca6@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <429CBCF5-217F-49A9-959B-9D20CA7CC64C@myemma.com> Cc: "Pavel Stehule" , pgsql-sql@postgresql.org Content-Transfer-Encoding: quoted-printable From: Erik Jones Subject: Re: temp table existence Date: Sun, 30 Dec 2007 00:26:08 -0600 To: Marcin Krawczyk X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/158 X-Sequence-Number: 29850 On Dec 29, 2007, at 3:16 PM, Marcin Krawczyk wrote: > I just realized something... my bad. It will work since TRUNCATE =20 > removes only table from current session. If the table exists and you're going to TRUNCATE it before using it, =20 you could just use DROP TABLE IF EXISTS and then create it. I don't =20 know, that feels cleaner to me than TRUNCATEing a table that might =20 not be available to the session. Erik Jones Software Developer | Emma=AE 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