From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] temp table oddness? |
Date: | 1999-09-04 16:10:04 |
Message-ID: | 24349.936461404@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-09-04 16:13:12 | Re: [HACKERS] temp table oddness? |
Previous Message | Tom Lane | 1999-09-04 15:57:49 | Re: [HACKERS] temp table oddness? |