Re: factorial function/phase out postfix operators?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: factorial function/phase out postfix operators?
Date: 2020-05-20 20:29:15
Message-ID: 7534.1590006555@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> writes:
> ... But if we made a clean distinction between the characters that are allowed in postfix operators vs. those allowed for infix operators, then we'd get to have postfix operators without the ambiguity, right?

I continue to see little point in half-baked compatibility measures
like that. You'd be much more likely to break working setups (that
might not even involve any postfix operators) than to accomplish
anything useful. In particular, if Joe DBA out there has a postfix
operator, and it's not named according to whatever rule you chose,
then you haven't done anything to fix his compatibility problem.

> When thinking about postfix operators, the subscript and superscript character ranges come to my mind, such as
> SELECT Σ₂(x² + y³ + z⁴);

We already have a convention about non-ASCII characters, and it is that
they are identifier characters not operator characters. Changing that
would break yet a different set of applications. (That is to say,
the above SELECT already has a well-defined lexical interpretation.)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2020-05-20 21:36:45 Operator class parameters and sgml docs
Previous Message Mark Dilger 2020-05-20 20:18:01 Re: factorial function/phase out postfix operators?