Re: read only transaction, temporary tables

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: read only transaction, temporary tables
Дата
Msg-id 43679C8F-75C0-4674-A940-B66DE8AD5A0A@pgedit.com
обсуждение исходный текст
Ответ на read only transaction, temporary tables  ("Carl R. Brune" <brune@ohio.edu>)
Ответы Re: read only transaction, temporary tables  ("Carl R. Brune" <brune@ohio.edu>)
Список pgsql-general
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 complicated (pieced
> together with php) and I'm just trying to be careful. What other
> alternatives are there for accomplishing this? Preferably
> simple ones...


How about:

BEGIN;
...
CREATE TEMPORARY TABLE ABC AS SELECT ...
...
ROLLBACK;



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: DISTINCT to get distinct *substrings*?
Следующее
От: "Chris Hoover"
Дата:
Сообщение: Why is default value not working on insert?