From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: anderson.ant.oli@gmail.com
Subject: BUG #15246: Does not allow an INOUT parameter to receive values when its data type is a user-defined data type.
Date: Mon, 18 Jun 2018 22:32:14 +0000
Message-ID: <152936113475.1444.7277014546852553718@wrigleys.postgresql.org> (raw)
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;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, anderson.ant.oli@gmail.com
Subject: Re: BUG #15246: Does not allow an INOUT parameter to receive values when its data type is a user-defined data type.
In-Reply-To: <152936113475.1444.7277014546852553718@wrigleys.postgresql.org>
References: <152936113475.1444.7277014546852553718@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox