Replacing a table - Mailing list pgsql-general

From Francisco Reyes
Subject Replacing a table
Date
Msg-id 20021030131758.Q17963-100000@zoraida.natserv.net
Whole thread Raw
Responses Re: Replacing a table  (Neil Conway <neilc@samurai.com>)
Re: Replacing a table  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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?



pgsql-general by date:

Previous
From: "Ian Harding"
Date:
Subject: Re: [SQL] unnecessary updates
Next
From: Neil Conway
Date:
Subject: Re: Replacing a table