connectby

From: Sergei Levchenko <serg(at)city(dot)gov(dot)te(dot)ua>
To: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: connectby
Date: 2003-10-27 14:42:10
Message-ID: 3F9D2EC2.9060204@city.gov.te.ua
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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

Browse pgsql-general by date

  From Date Subject
Next Message sector119 2003-10-27 14:47:17 connectby
Previous Message scott.marlowe 2003-10-27 14:40:39 Re: Index Usage Question

Browse pgsql-sql by date

  From Date Subject
Next Message sector119 2003-10-27 14:47:17 connectby
Previous Message Mukta Telang 2003-10-27 11:03:14 Unsubscribe