Re: [GENERAL] read only transaction, temporary tables

2006-08-12 Thread Peter Eisentraut
Tom Lane wrote: Richard Huxton dev@archonet.com writes: Carl R. Brune wrote: I should have added that I want to make further use of the temporary table after the COMMIT -- the rollback approach you propose makes it go away. In which case the transaction isn't READONLY. It does seem

Re: [GENERAL] read only transaction, temporary tables

2006-08-12 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: Temporary tables still get an entry in pg_class, so for truly readonly systems they wouldn't work. The READONLY transaction status is a security mechanism, not a performance-enhancing mechanism. It makes no pretense of preventing all disk

Re: [GENERAL] read only transaction, temporary tables

2006-08-10 Thread Carl R. Brune
Thanks for the information clarifications. Carl B. On Tue, 8 Aug 2006, Carl R. Brune wrote: I should have added that I want to make further use of the temporary table after the COMMIT -- the rollback approach you propose makes it go away. Carl Brune On Tue, 8 Aug 2006, John DeSoi wrote:

Re: [GENERAL] read only transaction, temporary tables

2006-08-09 Thread Richard Huxton
Carl R. Brune wrote: I should have added that I want to make further use of the temporary table after the COMMIT -- the rollback approach you propose makes it go away. In which case the transaction isn't READONLY. You have two options: CREATE TEMPORARY TABLE ... AS SELECT ... BEGIN READONLY;

Re: [GENERAL] read only transaction, temporary tables

2006-08-09 Thread Tom Lane
Richard Huxton dev@archonet.com writes: Carl R. Brune wrote: I should have added that I want to make further use of the temporary table after the COMMIT -- the rollback approach you propose makes it go away. In which case the transaction isn't READONLY. It does seem a bit inconsistent that

[GENERAL] read only transaction, temporary tables

2006-08-08 Thread Carl R. Brune
I recently tried to do something like the following BEGIN READONLY; ... CREATE TEMPORARY TABLE ABC AS SELECT ... ... COMMIT; and it failed because CREATE is not allowed within a read-only transaction. The select is something long and complicated (pieced together with php) and I'm just trying to

Re: [GENERAL] read only transaction, temporary tables

2006-08-08 Thread John DeSoi
On Aug 8, 2006, at 1:25 PM, Carl R. Brune wrote: I recently tried to do something like the following BEGIN READONLY; ... CREATE TEMPORARY TABLE ABC AS SELECT ... ... COMMIT; and it failed because CREATE is not allowed within a read-only transaction. The select is something long and

Re: [GENERAL] read only transaction, temporary tables

2006-08-08 Thread Carl R. Brune
I should have added that I want to make further use of the temporary table after the COMMIT -- the rollback approach you propose makes it go away. Carl Brune On Tue, 8 Aug 2006, John DeSoi wrote: On Aug 8, 2006, at 1:25 PM, Carl R. Brune wrote: I recently tried to do something like the