From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql/doc/src/sgml syntax.sgml |
Date: | 2001-02-24 21:47:08 |
Message-ID: | 15235.983051228@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Peter Eisentraut - PostgreSQL <petere(at)hub(dot)org> writes:
> Modified files:
> doc/src/sgml : syntax.sgml
> Log message:
> Choose a more suitable example for the operator precedence mis-parsing
> example.
I disagree with this change. The new example may be a more "useful"
computation than the old example, but it does not generate the desired
error message. Before, we got:
SELECT 5 ! ~ 6;
ERROR: Unable to identify an operator '!' for types 'int4' and 'int4'
You will have to retype this query using an explicit cast
The new example produces
SELECT 5 ! + 6;
ERROR: Unable to identify a left operator '+' for type 'int4'
You may need to add parentheses or an explicit cast
which would distract a reader from the primary point, namely that
the ambiguity between postfix and infix for '!' is what causes the
problem.
How do you feel about "SELECT 5 ! - 6;" as a compromise?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-02-24 22:42:45 | pgsql/src/backend/storage/buffer s_lock.c |
Previous Message | Peter Eisentraut - PostgreSQL | 2001-02-24 18:09:58 | pgsql/doc/src/sgml syntax.sgml |