From: | sector119(at)mail(dot)ru |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | connectby |
Date: | 2003-10-27 14:47:17 |
Message-ID: | 20031027144717.GA7838@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
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2003-10-27 14:49:53 | Re: Recomended FS |
Previous Message | Sergei Levchenko | 2003-10-27 14:42:10 | connectby |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-10-27 16:05:34 | Re: Query planner: current_* vs. explicit date |
Previous Message | Sergei Levchenko | 2003-10-27 14:42:10 | connectby |