BUG #13796: ALTER TYPE DROP COLUMN -- unexpected behavior ?

From: pplachta(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13796: ALTER TYPE DROP COLUMN -- unexpected behavior ?
Date: 2015-12-04 11:57:04
Message-ID: 20151204115704.5889.65257@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13796
Logged by: Peter Plachta
Email address: pplachta(at)gmail(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message plockaby 2015-12-04 22:58:06 BUG #13797: file "pg_multixact/members/79D4" doesn't exist, reading as zeroes
Previous Message Stanislav Grozev 2015-12-04 09:31:23 Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.