Re: [HACKERS] Postgres' lexer

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Leon <leon(at)udmnet(dot)ru>
Cc: hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Postgres' lexer
Date: 1999-09-02 15:22:49
Message-ID: 9478.936285769@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Leon <leon(at)udmnet(dot)ru> writes:
> So I decided to simply forbid long operators to end with minus.

No good: we already have some. There are three standard geometric
operators named "?-" ... not to mention lord-knows-what user-defined
operators out in the field. This might have been a good solution if
we'd put it in on day one, but it's too late.

I still like just telling people to write "a > -2". They don't expect
"ab" to mean the same thing as "a b", nor "24" to be the same as "2 4",
so why should ">-" necessarily mean the same as "> -" ?

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.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1999-09-02 15:32:59 Re: [HACKERS] md.c is feeling much better now, thank you
Previous Message Bruce Momjian 1999-09-02 15:22:02 Re: [HACKERS] md.c is feeling much better now, thank you