pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #7711: Accessing nested composite types in PL/PgSQL doesn't work
2+ messages / 2 participants
[nested] [flat]
* BUG #7711: Accessing nested composite types in PL/PgSQL doesn't work
@ 2012-11-29 05:27 mkolomeitsev@gmail.com
2012-11-29 05:35 ` Re: BUG #7711: Accessing nested composite types in PL/PgSQL doesn't work Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: mkolomeitsev@gmail.com @ 2012-11-29 05:27 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 7711
Logged by: Michael Kolomeitsev
Email address: mkolomeitsev@gmail.com
PostgreSQL version: 9.2.1
Operating system: Arch Linux
Description:
It seems multiple dots (".") are not allowed. For example: a.b.c := value;
How to reproduce:
CREATE TABLE nodes (
id SERIAL NOT NULL PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TYPE pathId AS (
id INTEGER,
node nodes
);
CREATE OR REPLACE FUNCTION test_AEN7304() RETURNS void AS $$
DECLARE
r pathId;
n nodes;
BEGIN
n.name := 'abc';
r.id := 1;
r.node := n; -- All is ok
r.node.name := 'def'; -- << Error here
-- (r).node.name := 'def'; -- << and here
-- ((r).node).name := 'def'; -- << and here
END;
$$ LANGUAGE 'plpgsql';
ERROR: "r.node.name" is not a known variable
(From http://archives.postgresql.org/pgsql-novice/2012-11/msg00057.php)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #7711: Accessing nested composite types in PL/PgSQL doesn't work
2012-11-29 05:27 BUG #7711: Accessing nested composite types in PL/PgSQL doesn't work mkolomeitsev@gmail.com
@ 2012-11-29 05:35 ` Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Stehule @ 2012-11-29 05:35 UTC (permalink / raw)
To: mkolomeitsev@gmail.com; +Cc: pgsql-bugs
Hello
it is not a bug - it is known limit :(
nested structures are not supported as target
anybody can implement it if like it
Regards
Pavel Stehule
2012/11/29 <mkolomeitsev@gmail.com>:
> The following bug has been logged on the website:
>
> Bug reference: 7711
> Logged by: Michael Kolomeitsev
> Email address: mkolomeitsev@gmail.com
> PostgreSQL version: 9.2.1
> Operating system: Arch Linux
> Description:
>
> It seems multiple dots (".") are not allowed. For example: a.b.c := value;
>
> How to reproduce:
> CREATE TABLE nodes (
> id SERIAL NOT NULL PRIMARY KEY,
> name TEXT NOT NULL
> );
>
> CREATE TYPE pathId AS (
> id INTEGER,
> node nodes
> );
>
> CREATE OR REPLACE FUNCTION test_AEN7304() RETURNS void AS $$
> DECLARE
> r pathId;
> n nodes;
> BEGIN
> n.name := 'abc';
> r.id := 1;
> r.node := n; -- All is ok
> r.node.name := 'def'; -- << Error here
> -- (r).node.name := 'def'; -- << and here
> -- ((r).node).name := 'def'; -- << and here
> END;
> $$ LANGUAGE 'plpgsql';
>
> ERROR: "r.node.name" is not a known variable
>
> (From http://archives.postgresql.org/pgsql-novice/2012-11/msg00057.php)
>
>
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-11-29 05:35 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-11-29 05:27 BUG #7711: Accessing nested composite types in PL/PgSQL doesn't work mkolomeitsev@gmail.com
2012-11-29 05:35 ` Pavel Stehule <pavel.stehule@gmail.com>
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