Eneboo - Documentación para desarrolladores
|
00001 /* 00002 * cash.h 00003 * Written by D'Arcy J.M. Cain 00004 * 00005 * Functions to allow input and output of money normally but store 00006 * and handle it as int4. 00007 */ 00008 00009 #ifndef CASH_H 00010 #define CASH_H 00011 00012 /* if we store this as 4 bytes, we better make it int, not long, bjm */ 00013 typedef int32 Cash; 00014 00015 extern Datum cash_in(PG_FUNCTION_ARGS); 00016 extern Datum cash_out(PG_FUNCTION_ARGS); 00017 extern Datum cash_recv(PG_FUNCTION_ARGS); 00018 extern Datum cash_send(PG_FUNCTION_ARGS); 00019 00020 extern Datum cash_eq(PG_FUNCTION_ARGS); 00021 extern Datum cash_ne(PG_FUNCTION_ARGS); 00022 extern Datum cash_lt(PG_FUNCTION_ARGS); 00023 extern Datum cash_le(PG_FUNCTION_ARGS); 00024 extern Datum cash_gt(PG_FUNCTION_ARGS); 00025 extern Datum cash_ge(PG_FUNCTION_ARGS); 00026 extern Datum cash_cmp(PG_FUNCTION_ARGS); 00027 00028 extern Datum cash_pl(PG_FUNCTION_ARGS); 00029 extern Datum cash_mi(PG_FUNCTION_ARGS); 00030 00031 extern Datum cash_mul_flt8(PG_FUNCTION_ARGS); 00032 extern Datum cash_div_flt8(PG_FUNCTION_ARGS); 00033 extern Datum flt8_mul_cash(PG_FUNCTION_ARGS); 00034 00035 extern Datum cash_mul_flt4(PG_FUNCTION_ARGS); 00036 extern Datum cash_div_flt4(PG_FUNCTION_ARGS); 00037 extern Datum flt4_mul_cash(PG_FUNCTION_ARGS); 00038 00039 extern Datum cash_mul_int4(PG_FUNCTION_ARGS); 00040 extern Datum cash_div_int4(PG_FUNCTION_ARGS); 00041 extern Datum int4_mul_cash(PG_FUNCTION_ARGS); 00042 00043 extern Datum cash_mul_int2(PG_FUNCTION_ARGS); 00044 extern Datum int2_mul_cash(PG_FUNCTION_ARGS); 00045 extern Datum cash_div_int2(PG_FUNCTION_ARGS); 00046 00047 extern Datum cashlarger(PG_FUNCTION_ARGS); 00048 extern Datum cashsmaller(PG_FUNCTION_ARGS); 00049 00050 extern Datum cash_words(PG_FUNCTION_ARGS); 00051 00052 #endif /* CASH_H */