Odd "operator does not exist" message

Started by David G. Johnstonover 10 years ago2 messagesbugs
Jump to latest
#1David G. Johnston
david.g.johnston@gmail.com

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...

David J.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: David G. Johnston (#1)
Re: Odd "operator does not exist" message

"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

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs