Re: [BUG] PostgreSQL 7.0.3 backend dumps core.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUG] PostgreSQL 7.0.3 backend dumps core.
Дата
Msg-id 15000.975424972@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [BUG] PostgreSQL 7.0.3 backend dumps core.  (Alan Turner <alan@suburbia.com.au>)
Список pgsql-bugs
Alan Turner <alan@suburbia.com.au> writes:
> test=# CREATE FUNCTION "f2" ( ) RETURNS magic AS '
> test'#         DECLARE
> test'#                 x RECORD;
> test'#         BEGIN
> test'#                 x.one := 1;
> test'#                 x.two := 2;
> test'#                 RETURN x;
> test'#         END;
> test'# ' LANGUAGE 'plpgsql';
> CREATE
> test=# select f2();
> pqReadData() -- backend closed the channel unexpectedly.

I think this coding should be rejected, but evidently it's not.  My
understanding of "record" in plpgsql is that it's just a placeholder
name for a tuple type determined elsewhere.  In this situation the
exact type of x is never determined, and so you shouldn't be able to
assign to fields of x.  Ooops.

In the meantime, it might work if you declare "x magic" instead of
"x record".

            regards, tom lane

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

Предыдущее
От: Alan Turner
Дата:
Сообщение: [BUG] PostgreSQL 7.0.3 backend dumps core.
Следующее
От: Karla Peralta
Дата:
Сообщение: Re: PortalHeapMemoryFree...in diskless client