Re: order by a XML column - Mailing list pgsql-general

From Doug McNaught
Subject Re: order by a XML column
Date
Msg-id m3elinqh5t.fsf@varsoon.denali.to
Whole thread Raw
In response to order by a XML column  (mclo@asia.com (Chris))
List pgsql-general
mclo@asia.com (Chris) writes:

> Hi,
>
> I have a table with a varchar column which store XML in this format :
>
> <A>Value of A</A><B>Value of B</B><C>Value of C</C>
>
> How can I sort the result by this column and the content of one of the tag.

You need to write a custom comparison function and use "ORDER BY ... USING".

-Doug
--
Doug McNaught       Wireboard Industries      http://www.wireboard.com/

      Custom software development, systems and network consulting.
      Java PostgreSQL Enhydra Python Zope Perl Apache Linux BSD...

pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Select not using primary key index
Next
From: Doug McNaught
Date:
Subject: Re: JDBC Prepared Statement Bug