Re: [GENERAL] read only transaction, temporary tables

2006-08-12 Thread Tom Lane
Martijn van Oosterhout 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 writes. I think a r

Re: [GENERAL] read only transaction, temporary tables

2006-08-12 Thread Martijn van Oosterhout
On Sat, Aug 12, 2006 at 08:57:49AM +0200, Peter Eisentraut wrote: > > It does seem a bit inconsistent that we allow you to write into a > > temp table during a "READONLY" transaction, but not to create/drop > > one. I'm not excited about changing it though, as the tests to see if > > the command is

Re: [GENERAL] read only transaction, temporary tables

2006-08-12 Thread Peter Eisentraut
Tom Lane wrote: > Richard Huxton 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-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: O

Re: [GENERAL] read only transaction, temporary tables

2006-08-09 Thread Tom Lane
Richard Huxton 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 we allow

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-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 foll

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 complicate

[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