Re: error after dropping column

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: error after dropping column
Дата
Msg-id 4B4BB2BA.1000309@postnewspapers.com.au
обсуждение исходный текст
Ответ на error after dropping column  (Filip Rembiałkowski <plk.zuber@gmail.com>)
Ответы Re: error after dropping column  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 11/01/2010 10:27 PM, Filip Rembiałkowski wrote:
> Hi all,
>
> not sure if I should send it here; if it was reported before in
> pgsql-general. you can just ignore it :-)
>
> with postgres 8.2.4:
>
> create table test (t1 text);
> create function row2text(test) returns text as 'select $1::text'
> language sql immutable;
> create index test_row2text_idx on test( row2text(test) );
> alter table test add t2 text;
> alter table test drop t2;
> insert into test(t1) select 'foo';
>
> ERROR:  table row type and query-specified row type do not match
> DETAIL:  Physical storage mismatch on dropped attribute at ordinal
> position 2.

I'm pretty certain that's not a bug.

It's certainly a feature limitation of PostgreSQL, but it's working as
(currently) designed. You're expected to reload any functions after
dropping columns of tables.

I've seen this discusssed recently, but 8.4 still behaves the same way.

--
Craig Ringer

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

Предыдущее
От: Alex Hunsaker
Дата:
Сообщение: Re: plperl & sort
Следующее
От: Tom Lane
Дата:
Сообщение: Re: error after dropping column