Re: [HACKERS] temp table oddness?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] temp table oddness?
Дата
Msg-id 24349.936461404@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] temp table oddness?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] temp table oddness?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Here's another case that doesn't work too well:

regression=> create table u1(i int);
CREATE
regression=> insert into u1 values(1);
INSERT 150665 1
regression=> insert into u1 values(1);
INSERT 150666 1
regression=> create temp table u1(i int);
CREATE
regression=> create unique index i_u1 on u1(i);
CREATE
regression=> select * from u1;        -- yup, temp table is empty
i
-
(0 rows)

regression=> drop table u1;        -- drop temp table
DROP
regression=> select * from u1;        -- ok, we're back to permanent u1
i
-
1
1
(2 rows)

regression=> begin;
BEGIN
regression=> create temp table u1(i int);
CREATE
regression=> create unique index i_u1 on u1(i);
ERROR:  Cannot create index: 'i_u1' already exists
-- apparently, dropping a temp table doesn't drop its temp indexes?
regression=> end;
END
regression=> select * from u1;
ERROR:  cannot find attribute 1 of relation pg_temp.24335.3
-- oops, what's causing this?  Shouldn't the xact have been rolled back
-- due to error?
regression=> \q
-- backend coredumps on quit


Looks like indexes on temp tables need some serious work :-(
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] temp table oddness?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] temp table oddness?