BUG #5154: ERROR: cannot assign non-composite value to a row variable

Поиск
Список
Период
Сортировка
От Jeff Shanab
Тема BUG #5154: ERROR: cannot assign non-composite value to a row variable
Дата
Msg-id 200910310036.n9V0amCb009845@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #5154: ERROR: cannot assign non-composite value to a row variable  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      5154
Logged by:          Jeff Shanab
Email address:      jshanab@earthlink.net
PostgreSQL version: 8.3.5
Operating system:   Linux
Description:        ERROR:  cannot assign non-composite value to a row
variable
Details:

As discussed on the irc. I had a problem with a utility function that was
being passed a NEW row and a null for the OLD row. The error was created
when it tries to store the row variable in the local variables. RhodiumToad
on the list provided this simple test.

create type foo1 as (a integer, b text);
CREATE TYPE
create type foo2 as (c integer, d foo1);
CREATE TYPE

create function foo() returns foo2 language plpgsql as $f$ declare v foo2;
begin v := null; return v; end; $f$;
CREATE FUNCTION

select foo();

ERROR: cannot assign non-composite value to a row variable

CONTEXT: PL/pgSQL function "foo" line 1 at assignment

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

Предыдущее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: BUG #5151: autovacuum process segfaults when max_fsm_pages are too low
Следующее
От: Robert Haas
Дата:
Сообщение: Re: BUG #5149: Can't untar the src code file