Skip site navigation (1) Skip section navigation (2)

connectby with schema

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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




Responses

pgsql-hackers by date

Next:From: scott.marloweDate: 2002-11-22 15:56:14
Subject: Re: performance of insert/delete/update
Previous:From: Stephan SzaboDate: 2002-11-22 15:35:47
Subject: Re: Question about DEADLOCK

pgsql-patches by date

Next:From: Fernando NasserDate: 2002-11-22 18:05:25
Subject: JDBC Emit SQLStatus for communication link errors
Previous:From: Evgen PotemkinDate: 2002-11-22 11:02:11
Subject: Hierarchical queries a la Oracle. Patch.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group