pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Jones <erik@myemma.com>
To: Marcin Krawczyk <jankes.mk@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: temp table existence
Date: Sun, 30 Dec 2007 00:26:08 -0600
Message-ID: <429CBCF5-217F-49A9-959B-9D20CA7CC64C@myemma.com> (raw)
In-Reply-To: <95f6bf9b0712291316x31ae9c8er80fb60a7db4aaca6@mail.gmail.com>
References: <95f6bf9b0712291116lc3c1df0o978922176e98f8d7@mail.gmail.com>
	<162867790712291133n1bb6a6fcqeb1234df1576dd8c@mail.gmail.com>
	<95f6bf9b0712291316x31ae9c8er80fb60a7db4aaca6@mail.gmail.com>


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.

Erik Jones

Software Developer | Emma®
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





view thread (8+ messages)  latest in thread

Message-ID: <429CBCF5-217F-49A9-959B-9D20CA7CC64C@myemma.com>
Permalink:  ../429CBCF5-217F-49A9-959B-9D20CA7CC64C@myemma.com/
Also on:    postgresql.org/message-id/429CBCF5-217F-49A9-959B-9D20CA7CC64C@myemma.com

 · 

reply

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: erik@myemma.com, jankes.mk@gmail.com, pavel.stehule@gmail.com
  Subject: Re: temp table existence
  In-Reply-To: <429CBCF5-217F-49A9-959B-9D20CA7CC64C@myemma.com>

* 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