Re: LTREE extension and "order by" - Mailing list pgsql-sql

From Pavel Stehule
Subject Re: LTREE extension and "order by"
Date
Msg-id CAFj8pRB7VPoHf7=2EpLrquY8r7ZryLBiR5WJu56RFqcQZ2J85Q@mail.gmail.com
Whole thread Raw
In response to Re: LTREE extension and "order by"  (Carla <cgourofino@hotmail.com>)
List 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 by date:

Previous
From: Carla
Date:
Subject: Re: LTREE extension and "order by"
Next
From: Ivan Polak
Date:
Subject: Re: LTREE extension and "order by"