Re: Unique operator error w/ concatenation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wells Oliver <woliver(at)padres(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Unique operator error w/ concatenation
Date: 2011-07-28 20:37:10
Message-ID: 5004.1311885430@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Wells Oliver <woliver(at)padres(dot)com> writes:
> Folks, experiencing an odd issue. The following on an 8.4 server: select 'foo'::text || 123
> Blows up, saying:

> ERROR: operator is not unique: text || integer
> LINE 1: select 'fo'::text || 123;
> ^
> HINT: Could not choose a best candidate operator. You might need to add explicit type casts.

> But on another postgres 8.4 server, it properly returns a concatenated string.

> Any tips on how/where I can track down why/where there might be duplicate operators?

psql's "\do ||" might help. Presumably somebody's stuck a user-defined
operator named || into that database ...

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Dhaval Shah 2011-07-28 23:29:28 A question on using CIDR datatype for both ipv6 and ipv4 address
Previous Message Wells Oliver 2011-07-28 20:19:24 Unique operator error w/ concatenation