|
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 673 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_INT32.
| Datum cash_div_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 717 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 803 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 763 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 919 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 881 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 841 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 619 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 664 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 655 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 174 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 646 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 637 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_mi | ( | PG_FUNCTION_ARGS | ) |
Definition at line 704 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 776 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 737 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 894 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 854 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 816 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 628 of file cash.c.
References fb(), PG_GETARG_CASH, and PG_RETURN_BOOL.
| Datum cash_numeric | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1052 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 388 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 691 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 593 of file cash.c.
References buf, PG_GETARG_POINTER, PG_RETURN_CASH, and pq_getmsgint64().
| Datum cash_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 604 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 962 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 931 of file cash.c.
References fb(), PG_GETARG_CASH, PG_RETURN_CASH, and result.
| Datum cashsmaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 946 of file cash.c.
References fb(), PG_GETARG_CASH, PG_RETURN_CASH, and result.
| Datum flt4_mul_cash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 789 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 750 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 906 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 1147 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 867 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 1179 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 829 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 1108 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.