query to select a linked list

Поиск
Список
Период
Сортировка
От Louis-David Mitterrand
Тема query to select a linked list
Дата
Msg-id 20070509125520.GA17497@apartia.fr
обсуждение исходный текст
Ответы Re: query to select a linked list  (Gregory Stark <stark@enterprisedb.com>)
Re: query to select a linked list  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Re: query to select a linked list  ("Aaron Bono" <postgresql@aranya.com>)
Re: query to select a linked list  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
Re: query to select a linked list  (Robert Edwards <bob@cs.anu.edu.au>)
Список pgsql-sql
Hi,

To build a threaded forum application I came up the following schema:

forum
------
id_forum | integer| not null  default nextval('forum_id_forum_seq'::regclass)
id_parent| integer| 
subject  | text   | not null
message  | text   | 

Each message a unique id_forum and an id_parent pointing to the replied 
post (empty if first post).

How can I build an elegant query to select all messages in a thread?

Thanks,


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Rommel the iCeMAn"
Дата:
Сообщение: Re: Error: Input string was not in a correct format
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: query to select a linked list