Re: read only transaction, temporary tables

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Richard Huxton <dev(at)archonet(dot)com>, "Carl R(dot) Brune" <brune(at)ohio(dot)edu>
Subject: Re: read only transaction, temporary tables
Date: 2006-08-12 06:57:49
Message-ID: 200608120857.51162.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Richard Huxton <dev(at)archonet(dot)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 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 allowed would become vastly more complex.

Temporary tables in the SQL standard are permanent objects, which is why
creating or dropping them is a durable operation and not allowed in
read-only transactions. It would probably make sense to allow creating
or dropping PostgreSQL-style temporary tables, though.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sandeep Kumar Jakkaraju 2006-08-12 11:12:31 Connection Object
Previous Message Peter Eisentraut 2006-08-12 06:53:52 Re: Syslog v/s filename in pg_ctl command