Re: [HACKERS] Postgres' lexer

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Postgres' lexer
Дата
Msg-id 9478.936285769@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Postgres' lexer  (Leon <leon@udmnet.ru>)
Список pgsql-hackers
Leon <leon@udmnet.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] md.c is feeling much better now, thank you
Следующее
От: Vadim Mikheev
Дата:
Сообщение: Re: [HACKERS] md.c is feeling much better now, thank you