Re: Common table expressions and threaded comments

Поиск
Список
Период
Сортировка
От Grzegorz Jaśkiewicz
Тема Re: Common table expressions and threaded comments
Дата
Msg-id 2f4958ff0904170553o554a8059j370132db83701ffa@mail.gmail.com
обсуждение исходный текст
Ответ на Common table expressions and threaded comments  (Cultural Sublimation <cultural_sublimation@yahoo.com>)
Список pgsql-general
On Fri, Apr 17, 2009 at 1:40 PM, Cultural Sublimation
<cultural_sublimation@yahoo.com> wrote:
>
> Greetings,
>
> I need to implement the classical problem of threaded comments in a Postgresql
> database.  I know that the upcoming 8.4 release includes Common Table
> Expressions, so I have to ask: is this feature the mother-of-all-solutions
> to the threaded comments problem, or is it still worth investigating ltree?
>
> Also, lots of people mention Joe Celko's book on this subject.  Is it still
> a valid resource, or do CTE's make it obsolete?

Depending on what you actually need, but yes - CTE is the solution,
depending obviously on your schema design...

I think David (Fetter) had some examples in his slides on how to solve
common problems like that in a query.



--
GJ

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

Предыдущее
От: Cultural Sublimation
Дата:
Сообщение: Common table expressions and threaded comments
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: postgres cascade weird behaviour