Re: [HACKERS] temp table oddness?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] temp table oddness?
Дата
Msg-id 24234.936459346@sss.pgh.pa.us
обсуждение исходный текст
Ответ на temp table oddness?  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> I found weird behavior with temp tables.
> test=> create table u1(i int);
> CREATE
> test=> insert into u1 values(1);
> INSERT 3408201 1
> test=> insert into u1 values(1);
> INSERT 3408202 1
> test=> create temp table u1(i int primary key);
> NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'u1_pkey' for table 'u1'
> NOTICE:  trying to delete a reldesc that does not exist.
> NOTICE:  trying to delete a reldesc that does not exist.
> CREATE

> Are these notices normal?

No --- looks like something wrong with relcache shared-invalidation.
FWIW, they do not occur with the new relcache code I'm currently
testing.  Hope to commit this stuff today.

> Next I exited the session and start psql again.

> test=> create temp table u1(i int primary key);
> NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'u1_pkey' for table 'u1'
> ERROR:  Cannot create unique index. Table contains non-unique values

> What's this? I thought temp tables completely mask persistent tables.

I still get this one, however.  Odd.  Apparently, a temp table will
successfully mask a regular table created earlier in the same psql
session, but *not* one that's been created in a different psql session.
Over to you, Bruce...
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] PostgreSQL 6.5.1: libpq++ libraries on IRIX 6.5
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] temp table oddness?