contrib/tablefunc/connectby question

From: sector119(at)mail(dot)ru
To: pgsql-general(at)postgresql(dot)org
Subject: contrib/tablefunc/connectby question
Date: 2003-04-22 07:42:15
Message-ID: 20030422074215.GA14546@city.gov.te.ua
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

test=# \d menu
id | integer | not null default
nextval('public.menu_id_seq'::text)
parent_id | integer |
data | text

I write query:

SELECT * FROM connectby('menu', 'id', 'parent_id', 1, 0)
AS t(id integer, parent_id integer, level integer);

and get only id, parent_id, level fields!
how am I able to get data field?

(only this way: SELECT id_, parent_id_, level, data FROM
connectby('menu', 'id', 'parent_id', 8, 0) AS t(id_ integer, parent_id_
integer, level integer), menu where menu.id = id_; ???)

--
WBR, sector119

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2003-04-22 08:23:39 Re: [SQL] Yet Another (Simple) Case of Index not used
Previous Message Jim C. Nasby 2003-04-22 07:17:23 Re: > 16TB worth of data question