Replacing a table

From: Francisco Reyes <lists(at)natserv(dot)com>
To: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: Replacing a table
Date: 2002-10-30 18:21:53
Message-ID: 20021030131758.Q17963-100000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have some report tables which get re-created every day.
Previously I had something like
drop table
select .... into table

I thought that given that the queries for these report tables take 20 to
30 minutes I would try something like
begin
drop
select ... into table
commit

However once I ran a test case I was unable to connect to the table.

What would be the way to replace tables?
The output is fairly small so I was thinking about something like:
Create data to cursor
drop table
select from cursor into table

Is this the best way?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-10-30 18:23:04 Re: duplicate key in unique index pg_statistic_relid_att_index
Previous Message Tom Lane 2002-10-30 18:19:27 Re: move 0 behaviour