pgsql: Clean up some problems with redundant cross-type arithmetic

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Clean up some problems with redundant cross-type arithmetic
Дата
Msg-id 20080617191056.B4AB1754595@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Clean up some problems with redundant cross-type arithmetic operators.  Add
int2-and-int8 implementations of the basic arithmetic operators +, -, *, /.
This doesn't really add any new functionality, but it avoids "operator is not
unique" failures that formerly occurred in these cases because the parser
couldn't decide whether to promote the int2 to int4 or int8.  We could
alternatively have removed the existing cross-type operators, but
experimentation shows that the cost of an additional type coercion expression
node is noticeable compared to such cheap operators; so let's not give up any
performance here.  On the other hand, I removed the int2-and-int4 modulo (%)
operators since they didn't seem as important from a performance standpoint.
Per a complaint last January from ykhuang.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        int.c (r1.81 -> r1.82)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/int.c?r1=1.81&r2=1.82)
        int8.c (r1.69 -> r1.70)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/int8.c?r1=1.69&r2=1.70)
    pgsql/src/include/catalog:
        catversion.h (r1.462 -> r1.463)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.462&r2=1.463)
        pg_operator.h (r1.159 -> r1.160)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_operator.h?r1=1.159&r2=1.160)
        pg_proc.h (r1.502 -> r1.503)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h?r1=1.502&r2=1.503)
    pgsql/src/include/utils:
        builtins.h (r1.316 -> r1.317)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/builtins.h?r1=1.316&r2=1.317)
        int8.h (r1.48 -> r1.49)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/int8.h?r1=1.48&r2=1.49)

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

Предыдущее
От: momjian@postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: Add URL for introduction to multibyte programming in C.
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Remove freeBackends counter from the sinval shared memory area.