Re: problems selecting from altered table

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: problems selecting from altered table
Дата
Msg-id 467805ED.3020207@archonet.com
обсуждение исходный текст
Ответ на Re: problems selecting from altered table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> Richard Huxton <dev@archonet.com> writes:
>> Any developers care to comment?
>
> plpgsql isn't very bright about tuple descriptors containing dropped
> columns.  The immediate problem is that compatible_tupdesc() doesn't
> think a tupdesc containing one column matches one containing the same
> column plus a dropped column; but fixing that would just allow
> subsequent processing to crash :-(.  It needs a fair amount of work.
> I think the other PLs are no better.

OK, I think (after a bit of playing) I see what you mean.

If I do the following:
   CREATE TYPE tt AS (id int);
   CREATE OR REPLACE FUNCTION sel_test2() RETURNS tt AS $$
   ...

Then it all works OK, because the SELECT inside the function is
returning one int and so is the function.

--
   Richard Huxton
   Archonet Ltd


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

Предыдущее
От: Noah Heusser
Дата:
Сообщение: Re: Dynamic Log tigger (plpgsql)
Следующее
От: "Jeffrey Webster"
Дата:
Сообщение: Re: initdb