BUG #4911: Cannot assign a value to a member of a nested composite type. - Mailing list pgsql-bugs

From Brian Ceccarelli
Subject BUG #4911: Cannot assign a value to a member of a nested composite type.
Date
Msg-id 200907092046.n69KkjuM091613@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4911
Logged by:          Brian Ceccarelli
Email address:      ceccareb@talussoftware.com
PostgreSQL version: 8.4
Operating system:   Windows, Linux
Description:        Cannot assign a value to a member of a nested composite
type.
Details:

In PL/pgsql, I cannot do:

   a.b.id := 1;

Where a and b are composite type variables.

Example.   Run the following:

---------------------------------------------
drop type if exists type_sp_status cascade;
create type type_sp_status as
(
   number_of_errors                int4
);


drop type if exists type_sp_all cascade;
create type type_sp_all as
(
   status                          type_sp_status
);



CREATE OR REPLACE FUNCTION f_test()
  RETURNS int4 AS
$BODY$
declare
   a                       type_sp_all;

begin

   a.status.number_of_errors := 1;

   raise notice 'number of errors  = %', a.status.number_of_errors;

   return 0;
end;
$BODY$
  LANGUAGE 'plpgsql' STABLE;

---------------------------------------------

pgsql-bugs by date:

Previous
From: Jack Douglas
Date:
Subject: Re: BUG #4908: escaping and dollar quotes: "ERROR: unterminated string"
Next
From: "Tom Bowden"
Date:
Subject: BUG #4912: server core dumps on xslt_process with empty param string