BUG #7711: Accessing nested composite types in PL/PgSQL doesn't work

Поиск
Список
Период
Сортировка
От mkolomeitsev@gmail.com
Тема BUG #7711: Accessing nested composite types in PL/PgSQL doesn't work
Дата
Msg-id E1Tdwer-0000Ff-5m@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #7711: Accessing nested composite types in PL/PgSQL doesn't work  (Pavel Stehule <pavel.stehule@gmail.com>)
Список 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 :=3D 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 :=3D 'abc';
  r.id :=3D 1;
  r.node :=3D n; -- All is ok
  r.node.name :=3D 'def'; -- << Error here
--  (r).node.name :=3D 'def'; -- << and here
--  ((r).node).name :=3D '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)

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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: PITR potentially broken in 9.2
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: BUG #7711: Accessing nested composite types in PL/PgSQL doesn't work