BUG #15246: Does not allow an INOUT parameter to receive values when its data type is a user-defined data type.

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: anderson(dot)ant(dot)oli(at)gmail(dot)com
Subject: BUG #15246: Does not allow an INOUT parameter to receive values when its data type is a user-defined data type.
Date: 2018-06-18 22:32:14
Message-ID: 152936113475.1444.7277014546852553718@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: 15246
Logged by: Anderson Antunes
Email address: anderson(dot)ant(dot)oli(at)gmail(dot)com
PostgreSQL version: 10.0
Operating system: Windows
Description:

I'm trying to assign a popular values to a custom data type that comes from
an INOUT parameter in the function. I already searched the internet and I
did not find a solution. This type of assignment is common in Oracle. I do
not understand why it was not implemented. I get the following message:
"ERROR:" Parameter XXX "is not variable unknown".

Thank you if you can answer me.

create table my_table1
(
co_1 integer,
co_2 character varying(20)
);

create table my_table2
(
co_1 char,
co_2 double precision
);

create type my_type as
(
rc_tb1 my_table1,
rc_tb2 my_table2
);

create or replace function fc_test
(
inout p_my_type my_type
)
as
$$
begin
p_my_type.rc_tbl1.co_1 := 1; -- ERRO: "p_my_type.rc_tbl1.co_1" is not
variable unknown !!!!
p_my_type.rc_tbl1.co_2 := 'Teeeeeeeeeest';
p_my_type.rc_tbl2.co_3 := 'T';
p_my_type.rc_tbl2.co_4 := 10.56;
end;
$$
language plpgsql;

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2018-06-18 22:41:42 Re: BUG #15246: Does not allow an INOUT parameter to receive values when its data type is a user-defined data type.
Previous Message Mario Emmenlauer 2018-06-18 20:56:01 Re: BUG #15243: make check shows errors, i.e. fails to find initdb and others