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

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #15246: Does not allow an INOUT parameter to receive values whenits data type is a user-defined data type.
Дата
Msg-id 152936113475.1444.7277014546852553718@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #15246: Does not allow an INOUT parameter to receive valueswhen its data type is a user-defined data type.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      15246
Logged by:          Anderson Antunes
Email address:      anderson.ant.oli@gmail.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;


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

Предыдущее
От: Mario Emmenlauer
Дата:
Сообщение: Re: BUG #15243: make check shows errors, i.e. fails to find initdband others
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #15246: Does not allow an INOUT parameter to receive valueswhen its data type is a user-defined data type.