Re: temporary table

From: Andrew Snow <andrew(at)modulus(dot)org>
To: jack <datactrl(at)tpg(dot)com(dot)au>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: temporary table
Date: 2001-10-26 05:48:05
Message-ID: 20011026154559.P14330-100000@esper.modulus.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


How about using the procedure only within a transaction - if something goes
wrong, the transaction can be aborted and all temporary tables will vanish,
meaning you can start a new transaction and call the procedure again without
worrying whether the temp tables exist.

- Andrew

On Fri, 26 Oct 2001, jack wrote:

> HI, all
>
> Temporary tables created by "CREATE TABLE" or by "SELECT ..INTO" are so hard
> to handle. If it doesn't exist, then "drop" cuases an error. If the same
> procedure runs second time without dropping all temporary tables, providing
> still in the same connection session, then procedure causes "table exists"
> error. And it's unable to search system table to find whether it exists or
> not. Is that possible to have a command like "drop table if exist"? Please
> provide advices, thank you!
>
>
> JACK
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Bergmann 2001-10-26 06:24:24 Directory Names????
Previous Message Seth Hettich 2001-10-26 05:10:46 initdb segfault - solaris 8