Re: [HACKERS] open 6.4 items

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] open 6.4 items
Date: 1998-09-10 17:59:47
Message-ID: 199809101759.NAA02672@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > allow multiple generic operators in expressions without the use of
> > parentheses
>
> I could just let this one go until it dies a quiet death, but...
>
> To parse "multiple generic operators", per the example
>
> select oid @ oid @ oid from table;
>
> one would have to change the associativity of many operators from
> non-associative (the correct assumption) to left- or right associative
> (the wrong thing to do). If we are going to allow operator extensibility
> we cannot make assumptions about the precedence order of operators, and
> should require parentheses to break the ambiguity.
>
> Unless someone has a good proposal on how to change the standard rules
> of arithmetic, or on how to change the parser to allow
> operator-dependent precedence in an extensible way, then we shouldn't
> bother tracking this as a problem statement imho.

I agree, except the error message returned from the parser is quite
confusing, just stating 'parse error'. In fact, it took me 10 minutes
to figure out what would and wouldn't work, and I had no idea that
parentheses would fix it.

If we can't give a better error message, we have to keep it on the
todo/bugs list until we can tell people what they are doing wrong, and
how to fix it.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joost Kraaijeveld 1998-09-10 18:00:36 Porting postgreSQL to Windows NT
Previous Message Bruce Momjian 1998-09-10 17:57:13 Re: [HACKERS] more on int8