cache lookup failed for type 0

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема cache lookup failed for type 0
Дата
Msg-id 41123B74.8030606@bigfoot.com
обсуждение исходный текст
Список pgsql-hackers
Hi all,
doing some tests:


regression=# create table test (a integer);
CREATE TABLE
regression=# alter table test add column b test;
ALTER TABLE
regression=# select * from test; a | b
---+---
(0 rows)

regression=# insert into test values ( 1, (2,null));   <--(1)
INSERT 4260928 1

regression=# \d test     Table "public.test" Column |  Type   | Modifiers
--------+---------+----------- a      | integer | b      | test    |

regression=# alter table test drop column a;
ALTER TABLE
regression=# insert into test values ( (3,null));
ERROR:  cache lookup failed for type 0

regression=# select * from test; b
---- ()
(1 row)

regression=# alter table test add column c integer;
ALTER TABLE
kalman=# select * from test;  b  | c
-----+--- (,) |
(1 row)

regression=# insert into test values ( (null,3), 4);  <--(2)
ERROR:  cannot cast type record to test
DETAIL:  Input has wrong number of columns.

regression=# \d test     Table "public.test" Column |  Type   | Modifiers
--------+---------+----------- b      | test    | c      | integer |



The two insert in (1) and (2) are the same ( change only the column order ),
but the (1) works and the (2) not.



Regards
Gaetano Mendola














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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Open items
Следующее
От: Gaetano Mendola
Дата:
Сообщение: table with no column with some rows inside !!