Creating temp tables inside read only transactions

From: mike beeper <mbeeper(at)hotmail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Creating temp tables inside read only transactions
Date: 2011-07-07 16:01:16
Message-ID: COL103-W29A6B90398FBE6770F8A25A7410@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

I have a function that creates a temp table, populate it with results
during intermediate processing, and reads from it at the end. When the
transaction is marked as read only, it does not allow creation of temp
table, even though there are no permanent writes to the db. Are there
any workarounds? The following block errors out.

SET TRANSACTION ISOLATION LEVEL READ COMMITTED READ ONLY;
create temp table test(test int);

Responses

Browse pgsql-general by date

  From Date Subject
Next Message akp geek 2011-07-07 16:01:56 Re: Oracle to Postgres migration open source tool
Previous Message Lennin Caro 2011-07-07 15:51:31 Re: Oracle to Postgres migration open source tool

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-07-07 16:09:44 Re: spinlock contention
Previous Message Heikki Linnakangas 2011-07-07 15:45:14 Re: SSI atomic commit