Peter Eisentraut <peter_e@gmx.net> writes:
> Also, looking for possible conflicts here, it seems that there is an
> operator ':' for exponentiation, which is of course extremely mnemonic.
> This reminds me of the ';' operator for logarithms, which I also use all
> the time in mathematical writing. Are those operators actually standard or
> just somebody's personal idea?
My guess is that someone back in the Berkeley days put them in as a tour
de force in parser-writing. An impressive show of skill it is, too;
I'm continually astonished that we are not having severe grammar ambiguity
problems from the fact that ';' can be an operator as well as a
statement terminator. ':' is only marginally safer. Yet, by golly,
they parse, and have continued to parse despite extensive later changes
to the pgsql grammar. Whoever that was knew his stuff.
Sooner or later, however, they'll probably break.
I'd not object if we removed these operators and instead provided
functions with the standard names log() and exp() for all the
non-integral numeric types. Comments?
regards, tom lane