|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <limits.h>#include <ctype.h>#include <math.h>#include "common/int.h"#include "libpq/pqformat.h"#include "nodes/miscnodes.h"#include "utils/builtins.h"#include "utils/cash.h"#include "utils/float.h"#include "utils/numeric.h"#include "utils/pg_locale.h"
Go to the source code of this file.
|
static |
Definition at line 40 of file cash.c.
References appendStringInfo(), appendStringInfoString(), buf, fb(), and value.
Referenced by cash_words().
| Datum cash_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 675 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_INT32.
| Datum cash_div_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 722 of file cash.c.
References ereport, errcode(), errmsg, ERROR, fb(), PG_GETARG_CASH, and PG_RETURN_FLOAT8.
Definition at line 131 of file cash.c.
References ereport, errcode(), errmsg, ERROR, fb(), float8_div(), FLOAT8_FITS_IN_INT64, and unlikely.
Referenced by cash_div_flt4(), and cash_div_flt8().
| Datum cash_div_flt4 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 814 of file cash.c.
References cash_div_float8(), PG_GETARG_CASH, PG_GETARG_FLOAT4, and PG_RETURN_CASH.
| Datum cash_div_flt8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 771 of file cash.c.
References cash_div_float8(), PG_GETARG_CASH, PG_GETARG_FLOAT8, and PG_RETURN_CASH.
| Datum cash_div_int2 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 939 of file cash.c.
References cash_div_int64(), PG_GETARG_CASH, PG_GETARG_INT16, and PG_RETURN_CASH.
| Datum cash_div_int4 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 898 of file cash.c.
References cash_div_int64(), i, PG_GETARG_CASH, PG_GETARG_INT32, and PG_RETURN_CASH.
Definition at line 157 of file cash.c.
References ereport, errcode(), errmsg, ERROR, fb(), i, and unlikely.
Referenced by cash_div_int2(), cash_div_int4(), and cash_div_int8().
| Datum cash_div_int8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 855 of file cash.c.
References cash_div_int64(), i, PG_GETARG_CASH, PG_GETARG_INT64, and PG_RETURN_CASH.
| Datum cash_eq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 621 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 666 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 657 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 175 of file cash.c.
References ereturn, errcode(), errmsg, fb(), INT64_FORMAT, PG_GETARG_CSTRING, PG_INT64_MIN, pg_mul_s64_overflow(), PG_RETURN_CASH, pg_sub_s64_overflow(), PGLC_localeconv(), printf, result, str, and value.
| Datum cash_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 648 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 639 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 708 of file cash.c.
References cash_mi_cash(), fb(), PG_GETARG_CASH, and PG_RETURN_CASH.
Definition at line 118 of file cash.c.
References ereport, errcode(), errmsg, ERROR, fb(), FLOAT8_FITS_IN_INT64, float8_mul(), and unlikely.
Referenced by cash_mul_flt4(), cash_mul_flt8(), flt4_mul_cash(), and flt8_mul_cash().
| Datum cash_mul_flt4 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 785 of file cash.c.
References cash_mul_float8(), PG_GETARG_CASH, PG_GETARG_FLOAT4, and PG_RETURN_CASH.
| Datum cash_mul_flt8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 743 of file cash.c.
References cash_mul_float8(), PG_GETARG_CASH, PG_GETARG_FLOAT8, and PG_RETURN_CASH.
| Datum cash_mul_int2 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 912 of file cash.c.
References cash_mul_int64(), PG_GETARG_CASH, PG_GETARG_INT16, and PG_RETURN_CASH.
| Datum cash_mul_int4 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 869 of file cash.c.
References cash_mul_int64(), i, PG_GETARG_CASH, PG_GETARG_INT32, and PG_RETURN_CASH.
Definition at line 144 of file cash.c.
References ereport, errcode(), errmsg, ERROR, fb(), i, pg_mul_s64_overflow(), and unlikely.
Referenced by cash_mul_int2(), cash_mul_int4(), cash_mul_int8(), int2_mul_cash(), int4_mul_cash(), and int8_mul_cash().
| Datum cash_mul_int8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 828 of file cash.c.
References cash_mul_int64(), i, PG_GETARG_CASH, PG_GETARG_INT64, and PG_RETURN_CASH.
| Datum cash_ne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 630 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_numeric | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1076 of file cash.c.
References DirectFunctionCall2, fb(), i, Int32GetDatum(), int64_to_numeric(), numeric_div(), numeric_round(), numeric_scale(), NumericGetDatum(), PG_GETARG_CASH, PG_RETURN_DATUM, PGLC_localeconv(), result, and scale.
| Datum cash_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 390 of file cash.c.
References buf, fb(), memcpy(), pg_abs_s64(), PG_GETARG_CASH, PG_RETURN_CSTRING, PGLC_localeconv(), psprintf(), result, and value.
| Datum cash_pl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 694 of file cash.c.
References cash_pl_cash(), fb(), PG_GETARG_CASH, and PG_RETURN_CASH.
| Datum cash_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 595 of file cash.c.
References buf, PG_GETARG_POINTER, PG_RETURN_CASH, and pq_getmsgint64().
| Datum cash_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 606 of file cash.c.
References buf, fb(), PG_GETARG_CASH, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), and pq_sendint64().
| Datum cash_words | ( | PG_FUNCTION_ARGS | ) |
Definition at line 985 of file cash.c.
References append_num_word(), appendStringInfoString(), buf, cstring_to_text_with_len(), fb(), initStringInfo(), INT64CONST, pfree(), pg_ascii_toupper(), PG_GETARG_CASH, PG_RETURN_TEXT_P, val, and value.
| Datum cashlarger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 952 of file cash.c.
References fb(), PG_GETARG_CASH, PG_RETURN_CASH, and result.
| Datum cashsmaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 968 of file cash.c.
References fb(), PG_GETARG_CASH, PG_RETURN_CASH, and result.
| Datum flt4_mul_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 799 of file cash.c.
References cash_mul_float8(), PG_GETARG_CASH, PG_GETARG_FLOAT4, and PG_RETURN_CASH.
| Datum flt8_mul_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 757 of file cash.c.
References cash_mul_float8(), PG_GETARG_CASH, PG_GETARG_FLOAT8, and PG_RETURN_CASH.
| Datum int2_mul_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 925 of file cash.c.
References cash_mul_int64(), PG_GETARG_CASH, PG_GETARG_INT16, and PG_RETURN_CASH.
| Datum int4_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1173 of file cash.c.
References ereturn, errcode(), errmsg, fb(), i, PG_GETARG_INT32, pg_mul_s64_overflow(), PG_RETURN_CASH, PGLC_localeconv(), result, scale, and unlikely.
| Datum int4_mul_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 883 of file cash.c.
References cash_mul_int64(), i, PG_GETARG_CASH, PG_GETARG_INT32, and PG_RETURN_CASH.
| Datum int8_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1206 of file cash.c.
References ereturn, errcode(), errmsg, fb(), i, PG_GETARG_INT64, pg_mul_s64_overflow(), PG_RETURN_CASH, PGLC_localeconv(), result, scale, and unlikely.
| Datum int8_mul_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 842 of file cash.c.
References cash_mul_int64(), i, PG_GETARG_CASH, PG_GETARG_INT64, and PG_RETURN_CASH.
| Datum numeric_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1133 of file cash.c.
References fb(), i, int64_to_numeric(), numeric_int8_safe(), numeric_mul_safe(), numeric_scale(), PG_GETARG_NUMERIC, PG_RETURN_CASH, PG_RETURN_NULL, PGLC_localeconv(), result, scale, SOFT_ERROR_OCCURRED, and unlikely.