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 ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org