Re: Odd "operator does not exist" message - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Odd "operator does not exist" message
Date
Msg-id 18772.1452316179@sss.pgh.pa.us
Whole thread Raw
In response to Odd "operator does not exist" message  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.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

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Odd "operator does not exist" message
Next
From: Alexey Lesovsky
Date:
Subject: BUG #13818: PostgreSQL crashes after cronjob runs as "postgres"