hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [4/4] incubator-hawq git commit: HAWQ-19. Add meta info for function and operator about cash with int8
Date Mon, 22 Feb 2016 03:02:31 GMT
HAWQ-19. Add meta info for function and operator about cash with int8


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/083aaf66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/083aaf66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/083aaf66

Branch: refs/heads/master
Commit: 083aaf66d6f5a03ec669936e0b5736d90ea21622
Parents: a0ab282
Author: Ming LI <mli@pivotal.io>
Authored: Mon Feb 22 10:58:40 2016 +0800
Committer: Ming LI <mli@pivotal.io>
Committed: Mon Feb 22 11:00:15 2016 +0800

----------------------------------------------------------------------
 src/backend/utils/adt/cash.c      |  4 ++--
 src/include/catalog/pg_operator.h |  3 +++
 src/include/catalog/pg_proc.h     | 12 ++++++++++++
 3 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/083aaf66/src/backend/utils/adt/cash.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c
index ae41d66..c156bd6 100644
--- a/src/backend/utils/adt/cash.c
+++ b/src/backend/utils/adt/cash.c
@@ -651,7 +651,7 @@ Datum
 cash_mul_int4(PG_FUNCTION_ARGS)
 {
 	Cash		c = PG_GETARG_CASH(0);
-	int64		i = PG_GETARG_INT64(1);
+	int32		i = PG_GETARG_INT64(1);
 	Cash		result;
 
 	result = c * i;
@@ -682,7 +682,7 @@ Datum
 cash_div_int4(PG_FUNCTION_ARGS)
 {
 	Cash		c = PG_GETARG_CASH(0);
-	int64		i = PG_GETARG_INT64(1);
+	int32		i = PG_GETARG_INT64(1);
 	Cash		result;
 
 	if (i == 0)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/083aaf66/src/include/catalog/pg_operator.h
----------------------------------------------------------------------
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index b400a0d..0281e53 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -482,6 +482,9 @@ DATA(insert OID = 915 (  "/"	   PGNSP PGUID b f	790  21 790   0   0  
0   0   0
 DATA(insert OID = 916 (  "*"	   PGNSP PGUID b f	701  790	790 908   0   0   0   0   0 flt8_mul_cash
- - ));
 DATA(insert OID = 917 (  "*"	   PGNSP PGUID b f	23	790 790 912   0   0   0   0   0 int4_mul_cash
- - ));
 DATA(insert OID = 918 (  "*"	   PGNSP PGUID b f	21	790 790 914   0   0   0   0   0 int2_mul_cash
- - ));
+DATA(insert OID = 8101 (  "*"	   PGNSP PGUID b f	790  20 790 8103   0   0   0   0   0 cash_mul_int8
- - ));
+DATA(insert OID = 8102 (  "/"	   PGNSP PGUID b f	790  20 790   0   0   0   0   0   0 cash_div_int8
- - ));
+DATA(insert OID = 8103 (  "*"	   PGNSP PGUID b f	20	790 790 8101 0   0   0   0   0 int8_mul_cash
- - ));
 
 DATA(insert OID = 965 (  "^"	   PGNSP PGUID b f	701  701	701 0 0 0 0 0 0 dpow - - ));
 DATA(insert OID = 966 (  "+"	   PGNSP PGUID b f 1034 1033 1034 0 0 0 0 0 0 aclinsert - -
));

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/083aaf66/src/include/catalog/pg_proc.h
----------------------------------------------------------------------
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 83bb46f..caf22a9 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -2251,6 +2251,18 @@ DESCR("multiply");
 DATA(insert OID = 867 ( cash_div_int2  PGNSP PGUID 12 f f t f i 2 790 f "790 21" _null_ _null_
_null_ cash_div_int2 - _null_ n ));
 DESCR("divide");
 
+/* int8_mul_cash(int8, money) => money */ 
+DATA(insert OID = 8104 ( int8_mul_cash  PGNSP PGUID 12 f f t f i 2 790 f "20 790" _null_
_null_ _null_ int8_mul_cash - _null_ n ));
+DESCR("multiply");
+
+/* cash_mul_int8(money, int8) => money */ 
+DATA(insert OID = 8105 ( cash_mul_int8  PGNSP PGUID 12 f f t f i 2 790 f "790 20" _null_
_null_ _null_ cash_mul_int8 - _null_ n ));
+DESCR("multiply");
+
+/* cash_div_int8(money, int8) => money */ 
+DATA(insert OID = 8106 ( cash_div_int8  PGNSP PGUID 12 f f t f i 2 790 f "790 20" _null_
_null_ _null_ cash_div_int8 - _null_ n ));
+DESCR("divide");
+
 /* cash_in(cstring) => money */ 
 DATA(insert OID = 886 ( cash_in  PGNSP PGUID 12 f f t f i 1 790 f "2275" _null_ _null_ _null_
cash_in - _null_ n ));
 DESCR("I/O");


Mime
View raw message