Re: create temp table .. on commit delete rows

От: Tom Lane
Тема: Re: create temp table .. on commit delete rows
Дата: ,
Msg-id: 20078.1160691455@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: create temp table .. on commit delete rows  (Bruce Momjian)
Ответы: Re: create temp table .. on commit delete rows  (Bruce Momjian)
Список: pgsql-hackers

Скрыть дерево обсуждения

create temp table .. on commit delete rows  (Teodor Sigaev, )
 Re: create temp table .. on commit delete rows  (Heikki Linnakangas, )
  Re: create temp table .. on commit delete rows  (Teodor Sigaev, )
   Re: create temp table .. on commit delete rows  (David Fetter, )
    Re: create temp table .. on commit delete rows  ("Jim C. Nasby", )
     Re: create temp table .. on commit delete rows  (David Fetter, )
      Re: create temp table .. on commit delete rows  (Bruce Momjian, )
       Re: create temp table .. on commit delete rows  (Tom Lane, )
        Re: create temp table .. on commit delete rows  (Bruce Momjian, )

Bruce Momjian <> writes:
> David Fetter wrote:
>>> Should something notice and raise a warning when people create a
>>> TEMP table and have AUTOCOMMIT on?

> Added to TODO:
>         o Issue a notice if CREATE TABLE ... ON COMMIT { DELETE ROWS |
>           DROP } is issued outside a multi-statement transaction

That is *not* what was suggested, and it doesn't seem very useful.  The
problem really comes when one uses a temp table in autocommit mode, not
at creation time.

The problem with the original suggestion is that the backend can't do it
because AUTOCOMMIT is a notion that exists only in the client-side code.
And the client can't do it very well because it'd have to parse SQL
commands, and even with that it wouldn't see CREATE TEMP TABLE commands
issued inside functions.
        regards, tom lane



В списке pgsql-hackers по дате сообщения:

От: Christopher Browne
Дата:
Сообщение: Re: [PERFORM] Hints proposal
От: "Ivan Zolotukhin"
Дата:
Сообщение: Re: Fwd: pg_dump VS alter database ... set search_path ...