Re: [HACKERS] Postgres' lexer - Mailing list pgsql-hackers

From Leon
Subject Re: [HACKERS] Postgres' lexer
Date
Msg-id 37CEA05B.9DA7047F@udmnet.ru
Whole thread Raw
In response to Re: [HACKERS] Postgres' lexer  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> It would also be worth remembering that "-" is far from the only unary
> operator name we have, and so a solution that creates special behavior
> just for "-" is really no solution at all.  Making a special case for
> "-" just increases the potential for confusion, not decreases it, IMHO.

Ok. Especially if there are more unary operators (I always wondered
what unary % in gram.y stands for :)  it is reasonable not to make
a special case of uminus and slightly change the old behavior. That
is even more convincing that constructs like 3+-2 and 3+-b were 
parsed in different way, and, what is worse, a>-2 and a>-b also
parsed differently. So let us ask the (hopefully) last question:
Thomas (Lockhart), do you agree on always parsing constructs like
'+-' or '>-' as is, and not as '+' '-' or '>' '-'  ?

-- 
Leon.



pgsql-hackers by date:

Previous
From: Leon
Date:
Subject: Lexer again.
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Postgres' lexer