Re: AW: [HACKERS] Getting OID in psql of recent insert - Mailing list pgsql-hackers

From Tom Lane
Subject Re: AW: [HACKERS] Getting OID in psql of recent insert
Date
Msg-id 9433.943424941@sss.pgh.pa.us
Whole thread Raw
In response to Re: AW: [HACKERS] Getting OID in psql of recent insert  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Cache on pg_statistics
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] pid file for postmaster?