Re: [HACKERS] Operator definitions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Operator definitions
Дата
Msg-id 14154.938097658@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Operator definitions  (Adriaan Joubert <a.joubert@albourne.com>)
Ответы Re: [HACKERS] Operator definitions  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Adriaan Joubert <a.joubert@albourne.com> writes:
> OK, here is a patch to allow both ^ and | as operators, both in operator
> definitions and expressions. It seems to work for me. Unfortunately the
> regression tests do not tell me an awful lot, as several of them fail on
> the Alpha anyway. As I don;t really know what I'm doing, I'd appreciate
> it if somebody else could check the patch out and let me know whether it
> is ok.

If you search for, eg, '%', you will find there are several production
lists that call out all the operators; your patch only caught one of them.

This is a real pain in the neck to maintain, but AFAIK we couldn't
collapse the productions into a single one using MathOp without losing
operator precedence info :-(

It might be helpful if gram.y had annotations like "# Here be MathOps"
so that you could search for the darn things and make sure you had
adjusted each and every production list whenever you added/deleted one.
        regards, tom lane


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

Предыдущее
От: "Ansley, Michael"
Дата:
Сообщение: Lexxing and yaccing...
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: [HACKERS] Compile timing