Re: temp table existence - Mailing list pgsql-sql

From Pavel Stehule
Subject Re: temp table existence
Date
Msg-id 162867790712300044w78a4e633kaccc5e9e4d15dd28@mail.gmail.com
Whole thread Raw
In response to Re: temp table existence  (Erik Jones <erik@myemma.com>)
List pgsql-sql
Hello

On 30/12/2007, Erik Jones <erik@myemma.com> 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
>
>
>


pgsql-sql by date:

Previous
From: Erik Jones
Date:
Subject: Re: temp table existence
Next
From: Trilok Kumar
Date:
Subject: Re: sql query question ?