Re: LTREE extension and "order by"

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: LTREE extension and "order by"
Дата
Msg-id CAFj8pRB7VPoHf7=2EpLrquY8r7ZryLBiR5WJu56RFqcQZ2J85Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: LTREE extension and "order by"  (Carla <cgourofino@hotmail.com>)
Список pgsql-sql
2011/7/21 Carla <cgourofino@hotmail.com>:
> Hmm, I'm using PostgreSQL 8.4 and it worked.
> Try to use the function ltree2text instead of ::text.
> select * from comments where article_id = 2 order by
> cast(string_to_array(ltree2text(path),'.') as integer[]);
>

this does not work in older versions

you can use http://www.pgsql.cz/index.php/PostgreSQL_SQL_Tricks#Cast_to_varchar

Regards

Pavel Stehule


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

Предыдущее
От: Carla
Дата:
Сообщение: Re: LTREE extension and "order by"
Следующее
От: Ivan Polak
Дата:
Сообщение: Re: LTREE extension and "order by"