Re: org.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type xml

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: gajendra s v <svgajendra(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: org.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type xml
Date: 2013-11-19 22:11:04
Message-ID: 1384899064.80953.YahooMailNeo@web162904.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

gajendra s v <svgajendra(at)gmail(dot)com> wrote:

> I have added one column with xml type ,after adding I am getting
> following error.
>
> org.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type xml

The UNION operation requires comparing all columns in the result
record to remove duplicates.  To identify duplicates, there must be
a notion of equality defined (getting technical here) by a default
btree opclass for the type.  XML does not have one, so UNION of a
result set including an XML column is not allowed.

Do you need the duplicate removal?  If not, use UNION ALL.  If you
need that you may need to cast the XML to text for intermediate
steps and then cast back to XML at the outermost level.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2013-11-19 22:19:58 Re: org.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type xml
Previous Message Janek Sendrowski 2013-11-19 20:22:54 Re: Regex files are missing