From: | Masaru Sugawara <rk73(at)sea(dot)plala(dot)or(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | connectby with schema |
Date: | 2002-11-22 15:50:50 |
Message-ID: | 20021123002431.E7CE.RK73@sea.plala.or.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Hi, all
While testing RC1, I found CONNECTBY had another problem.
It seems to me that SCHEMA can't be used in CONNECTBY.
Is it just in time for 7.3 to be added to TODO items ?
CREATE TABLE test (id int4, parent_id int4, t text);
INSERT INTO test VALUES(11, null, 'aaa');
INSERT INTO test VALUES(101, 11, 'bbb');
INSERT INTO test VALUES(110, 11, 'ccc');
INSERT INTO test VALUES(111, 110, 'ddd');
SELECT *
FROM connectby('test', 'id', 'parent_id', '11', 0, '.')
as t(id int4, parent_id int4, level int, branch text);
id | parent_id | level | branch
-----+-----------+-------+------------
11 | | 0 | 11
101 | 11 | 1 | 11.101
110 | 11 | 1 | 11.110
111 | 110 | 2 | 11.110.111
(4 rows)
CREATE SCHEMA ms;
CREATE TABLE ms.test (id int4, parent_id int4, t text);
INSERT INTO ms.test VALUES(11, null, 'aaa');
INSERT INTO ms.test VALUES(101, 11, 'bbb');
INSERT INTO ms.test VALUES(110, 11, 'ccc');
INSERT INTO ms.test VALUES(111, 110, 'ddd');
SELECT *
FROM connectby('ms.test', 'id', 'parent_id', '101', 0, '.')
as t(id int4, parent_id int4, level int, branch text);
ERROR: Relation "ms.test" does not exist
Regards,
Masaru Sugawara
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2002-11-22 15:56:14 | Re: performance of insert/delete/update |
Previous Message | Stephan Szabo | 2002-11-22 15:35:47 | Re: Question about DEADLOCK |
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando Nasser | 2002-11-22 18:05:25 | JDBC Emit SQLStatus for communication link errors |
Previous Message | Evgen Potemkin | 2002-11-22 11:02:11 | Hierarchical queries a la Oracle. Patch. |