Re: order by a XML column

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: order by a XML column
Date: 2002-03-15 00:20:23
Message-ID: 3C913E47.8030608@selectacast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think there is something in contrib that deals with xml.

Chris wrote:
> 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.
>
> e.g. The table has 2 rows :
> row 1: <A>Man</A><B>Woman</B><C>Child</C>
> row 2: <A>Tree</A><B>Flower</B></C>Plant</C>
>
> If I sort by the tag "<B>", the result would be :
> row 2
> row 1
>
> If I sort by the tag "<A>", the result would be :
> row 1
> row 2
>
> Thanks & Regards,
> Chris

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carlo Florendo 2002-03-15 00:30:56 RPM vs. Source
Previous Message Tom Lane 2002-03-15 00:12:31 Re: parallel transactions in SMP