Re: Odd "operator does not exist" message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Odd "operator does not exist" message
Date: 2016-01-09 05:09:39
Message-ID: 18772.1452316179@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> Stumbled across this and it just seemed unusual - though by no means
> cryptic.

> SELECT 'text' || AS label
> ERROR: operator does not exist: unknown ||
> The lack of a second type to the right of the operator symbol caught my
> attention.
> SELECT 1 + AS label
> ERROR: syntax error at or near "AS"
> Was seemingly what I had been expecting...

|| is allowed as a postfix operator, + is not ...

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message sergey-v 2016-01-09 13:02:30 BUG #13858: Server with debugger installed consumes 100% of one CPU core
Previous Message David G. Johnston 2016-01-09 01:57:36 Odd "operator does not exist" message