Re: tree ordering with varbit

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: tree ordering with varbit
Дата
Msg-id 3DD91343.4080403@joeconway.com
обсуждение исходный текст
Ответ на tree ordering with varbit  (Scott Lamb <slamb@slamb.org>)
Список pgsql-general
Scott Lamb wrote:
> Joe Conway wrote:
>> Scott Lamb wrote:
>>> - I could't see a way to do multi-item sorts, like by score
>>> descending and then post time ascending, for example.
>>
>> If I understand what you're saying correctly, I think you can just
>> join back to the real table from the table function by the primary
>> key. Then you can sort on anything you want.
>
> I'd like to do this but hierarchically also. I.e., sorting based on its
> deepest ancestors score then post time, second deepest's score then post
> time, ..., its score then post time. So I guess in your function's
> language, I'd need to be able to put a couple of columns into the branch
> text.

Ahh, now I understand. This just came up on another list (I think it was the
sql list) -- someone wanted to build a pathname, but is using integer ids to
form the hierarchy. That made me think about an alternative version of the
connectby() function that would allow you to specify a column name to be used
for building something similar to the "branch" field. The "branch" would still
be needed (at least internally) to prevent infinite recursion, so this would
represent additional overhead, and therefore be optional.

It's too late to get functionality changes included in 7.3, but I can make
interim versions available via url. I'll post a message and a link when I get
a chance to address these issues.

Thanks,

Joe


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

Предыдущее
От: Lee Kindness
Дата:
Сообщение: ANN: EMS PostgreSQL Manager 0.94 released!
Следующее
От: Jesus Rios
Дата:
Сообщение: Re: COMAND TO ADD NEW USER TO MY DATABASE????