Re: order by a XML column

From: Doug McNaught <doug(at)wireboard(dot)com>
To: mclo(at)asia(dot)com (Chris)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: order by a XML column
Date: 2002-03-14 15:54:06
Message-ID: m3elinqh5t.fsf@varsoon.denali.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

mclo(at)asia(dot)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...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-03-14 15:54:47 Re: Select not using primary key index
Previous Message Doug McNaught 2002-03-14 15:51:34 Re: Select not using primary key index