X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 77B44D1B4EB; Mon, 27 Oct 2003 14:47:49 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 63333-02; Mon, 27 Oct 2003 10:47:22 -0400 (AST) Received: from cola.bit.te.ua (unknown [217.196.164.57]) by svr1.postgresql.org (Postfix) with ESMTP id 3BE62D1B522; Mon, 27 Oct 2003 10:47:15 -0400 (AST) Received: from cit-mars.l5.city.int (IDENT:1000@cit-mars.l5.city.int [10.0.1.33]) by cola.bit.te.ua (8.11.6/8.11.6) with ESMTP id h9RElIW16789; Mon, 27 Oct 2003 16:47:18 +0200 Received: (from sector119@localhost) by cit-mars.l5.city.int (8.12.10/8.12.10/Submit) id h9RElHWe008072; Mon, 27 Oct 2003 16:47:17 +0200 X-Authentication-Warning: cit-mars.l5.city.int: sector119 set sender to sector119@mail.ru using -f Date: Mon, 27 Oct 2003 16:47:17 +0200 From: sector119@mail.ru To: pgsql-general@postgresql.org Cc: pgsql-sql@postgresql.org Subject: connectby Message-ID: <20031027144717.GA7838@city.gov.te.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/1279 X-Sequence-Number: 51352 hi I have menu table: id | integer | not null default nextval('public.menu_id_seq'::text) parent_id | integer | description | text | I do select: test=> SELECT * FROM connectby('menu','id','parent_id','2',0,'~') t(id integer, parent_id integer, level int, branch text); id | parent_id | level | branch ----+-----------+-------+------------- 2 | | 0 | 2 4 | 2 | 1 | 2~4 7 | 4 | 2 | 2~4~7 10 | 7 | 3 | 2~4~7~10 16 | 10 | 4 | 2~4~7~10~16 9 | 4 | 2 | 2~4~9 How am I able to select description file from menu table, not only id, parent_id, level, branch fields? -- WBR, sector119