BUG #13796: ALTER TYPE DROP COLUMN -- unexpected behavior ? - Mailing list pgsql-bugs

From pplachta@gmail.com
Subject BUG #13796: ALTER TYPE DROP COLUMN -- unexpected behavior ?
Date
Msg-id 20151204115704.5889.65257@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #13796: ALTER TYPE DROP COLUMN -- unexpected behavior ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      13796
Logged by:          Peter Plachta
Email address:      pplachta@gmail.com
PostgreSQL version: 9.4.5
Operating system:   mac os x
Description:

Here is a testcase:
create type complex as (a1 int, a2 numeric, a3 text, a4 int, a5 int);
create or replace function foo(arg complex) returns complex as $$
begin
  return ( select arg );
end; $$ language plpgsql;
-- modify type test
alter type complex drop attribute a4;
select foo(row(1, 1.1, 'one', 111));
======================
The last one prints:
     foo
--------------
 (1,1.1,one,)
(1 row)
======================
Why is the last element NULLed out? It's not like I can pass 5 elements to
the function.

pgsql-bugs by date:

Previous
From: sebastian.sierra@netbeam.com.co
Date:
Subject: BUG #13803: too many clients exception
Next
From: mike.lang1010@gmail.com
Date:
Subject: BUG #13798: Unexpected multiple exection of user defined function with out parameters