From: | Gaetano Mendola <mendola(at)bigfoot(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | cache lookup failed for type 0 |
Date: | 2004-08-05 13:51:48 |
Message-ID: | 41123B74.8030606@bigfoot.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Gaetano Mendola | 2004-08-05 13:59:32 | table with no column with some rows inside !! |
Previous Message | Tom Lane | 2004-08-05 13:51:12 | Re: Open items |