pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Unique operator error w/ concatenation
2+ messages / 2 participants
[nested] [flat]

* Unique operator error w/ concatenation
@ 2011-07-28 20:19 Wells Oliver <woliver@padres.com>
  2011-07-28 20:37 ` Re: Unique operator error w/ concatenation Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Wells Oliver @ 2011-07-28 20:19 UTC (permalink / raw)
  To: pgsql-admin

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?

--
Wells Oliver
Architect, Baseball Systems
619-795-5359
San Diego Padres | 100 Park Boulevard | San Diego CA 92101




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Unique operator error w/ concatenation
  2011-07-28 20:19 Unique operator error w/ concatenation Wells Oliver <woliver@padres.com>
@ 2011-07-28 20:37 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2011-07-28 20:37 UTC (permalink / raw)
  To: Wells Oliver <woliver@padres.com>; +Cc: pgsql-admin

Wells Oliver <woliver@padres.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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-07-28 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-07-28 20:19 Unique operator error w/ concatenation Wells Oliver <woliver@padres.com>
2011-07-28 20:37 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox