From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add hint for function named "is" |
Date: | 2016-08-12 16:41:56 |
Message-ID: | CA+TgmoaCt+JdWYfd4BDH-0EiPyBrVxyWFjHJQdvksJB7eKROLA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 12, 2016 at 9:40 AM, Greg Stark <stark(at)mit(dot)edu> wrote:
> On Thu, Aug 11, 2016 at 10:54 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> I think what is happening
>> in the trouble case is that since IS has lower precedence than Op, the
>> grammar decides it ought to resolve || as a postfix operator, and then
>> it effectively has
>> ('x' ||) IS ...
>> which leaves noplace to go except IS NULL and other IS-something syntaxes.
>
> I wonder whether it's really worth keeping postfix operators. They
> seem to keep causing these kinds of headaches and I wonder how much
> the grammar tables would be simplified by removing them.
I've wondered the same thing at other times. The only postfix
operator we ship in core is numeric_fac, and frankly it doesn't seem
worth it just for that. If we decided that factorial(n) was adequate
notation for that case, and that we didn't care about any hypothetical
user-defined postfix operators either, I think we simplify or improve
a number of things.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Kisung Kim | 2016-08-12 16:48:49 | Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2) |
Previous Message | Tom Lane | 2016-08-12 15:35:19 | Re: Fwd: [BUG] Print timing statistics of trigger execution under turned off timing option of EXPLAIN ANALYZE |