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

From: David Johnston <polobo(at)yahoo(dot)com>
To: 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:19:58
Message-ID: 1384899598791-5779269.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kevin Grittner-5 wrote
> gajendra s v &lt;

> svgajendra@

> &gt; 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.

The other option is to only union the PK field(s) on KM_COURSE_MAST then as
a final outer query join that union-ed result back with KM_COURSE_MAST using
the PK and attach whatever additional columns your query desires.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/org-postgresql-util-PSQLException-ERROR-could-not-identify-an-equality-operator-for-type-xml-tp5779042p5779269.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2013-11-20 00:29:01 Re: Postgres as In-Memory Database?
Previous Message Kevin Grittner 2013-11-19 22:11:04 Re: org.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type xml