summaryrefslogtreecommitdiff
path: root/src/include/utils/builtins.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-06-17 19:10:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-06-17 19:10:56 +0000
commitb163baa89ce0e4385497bc0f38deaf0078074d76 (patch)
tree247ea4721f276d9c9cb608b1e3fd586aa861269c /src/include/utils/builtins.h
parent4274726d4225158c69fef04aadc10e7e26f41971 (diff)
downloadpostgresql-b163baa89ce0e4385497bc0f38deaf0078074d76.tar.gz
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.
Diffstat (limited to 'src/include/utils/builtins.h')
-rw-r--r--src/include/utils/builtins.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index e152fe671a..c34ee7aa90 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.316 2008/05/27 00:13:09 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.317 2008/06/17 19:10:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -190,8 +190,6 @@ extern Datum int42mul(PG_FUNCTION_ARGS);
extern Datum int42div(PG_FUNCTION_ARGS);
extern Datum int4mod(PG_FUNCTION_ARGS);
extern Datum int2mod(PG_FUNCTION_ARGS);
-extern Datum int24mod(PG_FUNCTION_ARGS);
-extern Datum int42mod(PG_FUNCTION_ARGS);
extern Datum int2larger(PG_FUNCTION_ARGS);
extern Datum int2smaller(PG_FUNCTION_ARGS);
extern Datum int4larger(PG_FUNCTION_ARGS);