Re: read only transaction, temporary tables - Mailing list pgsql-general

From Richard Huxton
Subject Re: read only transaction, temporary tables
Date
Msg-id 44D992CB.6010605@archonet.com
Whole thread Raw
In response to Re: read only transaction, temporary tables  ("Carl R. Brune" <brune@ohio.edu>)
Responses Re: read only transaction, temporary tables
List pgsql-general
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;
...
COMMIT;

Or, create a user with only-read permissions on your database and
connect as that user.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: clients and libs and versions (oh my)
Next
From: Richard Huxton
Date:
Subject: Re: sizing of a server