[HACKERS] operator precedence issues

2013-09-03 Thread Merlin Moncure
On Tue, Sep 3, 2013 at 9:13 AM, Tom Lane wrote: > Andres Freund writes: >> On 2013-09-03 08:59:53 -0500, Merlin Moncure wrote: >>> While playing around with Andres's trick, I noticed that it works but >>> will not match against operators taking "any" although those will >>> match with explicit sc

Re: [HACKERS] operator precedence issues

2013-09-03 Thread Tom Lane
Andres Freund writes: > On 2013-09-03 08:59:53 -0500, Merlin Moncure wrote: >> While playing around with Andres's trick, I noticed that it works but >> will not match against operators taking "any" although those will >> match with explicit schema declaration (FWICT it goes through the >> search_p

Re: [HACKERS] operator precedence issues

2013-09-03 Thread Andres Freund
On 2013-09-03 08:59:53 -0500, Merlin Moncure wrote: > While playing around with Andres's trick, I noticed that it works but > will not match against operators taking "any" although those will > match with explicit schema declaration (FWICT it goes through the > search_path trying to explicitly matc

Re: [HACKERS] operator precedence issues

2013-09-03 Thread Merlin Moncure
On Fri, Aug 30, 2013 at 5:48 PM, Andres Freund wrote: > Hi, > > On 2013-08-30 17:35:04 -0500, Merlin Moncure wrote: >> "When a schema-qualified operator name is used in the OPERATOR syntax, >> as for example in: >> SELECT 3 OPERATOR(pg_catalog.+) 4; >> the OPERATOR construct is taken to have the d

Re: [HACKERS] operator precedence issues

2013-08-30 Thread Andres Freund
Hi, On 2013-08-30 17:35:04 -0500, Merlin Moncure wrote: > "When a schema-qualified operator name is used in the OPERATOR syntax, > as for example in: > SELECT 3 OPERATOR(pg_catalog.+) 4; > the OPERATOR construct is taken to have the default precedence shown > in Table 4-2 for "any other" operator.

Re: [HACKERS] operator precedence issues

2013-08-30 Thread Tom Lane
Merlin Moncure writes: > The operator precedence rules seem hard wired to not be able to be > worked around, not matter what. That's right. In the first place, bison is incapable of doing anything other than hard-wired operator precedence. In the second, if we did try to allow catalog-driven pr

[HACKERS] operator precedence issues

2013-08-30 Thread Merlin Moncure
Hackers, The operator precedence rules seem hard wired to not be able to be worked around, not matter what. The pain point for me has always been the division operator -- once in a while I end up in a situation where I want to override it so that it wraps the divisor with NULLIF. There is no way