14 #ifndef _PG_NUMERIC_H_
15 #define _PG_NUMERIC_H_
32 #define NUMERIC_MAX_PRECISION 1000
34 #define NUMERIC_MIN_SCALE (-1000)
35 #define NUMERIC_MAX_SCALE 1000
40 #define NUMERIC_MAX_DISPLAY_SCALE NUMERIC_MAX_PRECISION
41 #define NUMERIC_MIN_DISPLAY_SCALE 0
43 #define NUMERIC_MAX_RESULT_SCALE (NUMERIC_MAX_PRECISION * 2)
50 #define NUMERIC_MIN_SIG_DIGITS 16
78 #define PG_GETARG_NUMERIC(n) DatumGetNumeric(PG_GETARG_DATUM(n))
79 #define PG_GETARG_NUMERIC_COPY(n) DatumGetNumericCopy(PG_GETARG_DATUM(n))
80 #define PG_RETURN_NUMERIC(x) return NumericGetDatum(x)
#define PG_DETOAST_DATUM_COPY(datum)
#define PG_DETOAST_DATUM(datum)
int32 numeric_maximum_size(int32 typmod)
int32 numeric_int4_opt_error(Numeric num, bool *have_error)
char * numeric_normalize(Numeric num)
static Numeric DatumGetNumericCopy(Datum X)
Numeric numeric_mod_opt_error(Numeric num1, Numeric num2, bool *have_error)
Numeric numeric_div_opt_error(Numeric num1, Numeric num2, bool *have_error)
Numeric int64_to_numeric(int64 val)
Numeric random_numeric(pg_prng_state *state, Numeric rmin, Numeric rmax)
static Numeric DatumGetNumeric(Datum X)
Numeric int64_div_fast_to_numeric(int64 val1, int log10val2)
int64 numeric_int8_opt_error(Numeric num, bool *have_error)
struct NumericData * Numeric
bool numeric_is_nan(Numeric num)
Numeric numeric_sub_opt_error(Numeric num1, Numeric num2, bool *have_error)
Numeric numeric_mul_opt_error(Numeric num1, Numeric num2, bool *have_error)
char * numeric_out_sci(Numeric num, int scale)
Numeric numeric_add_opt_error(Numeric num1, Numeric num2, bool *have_error)
bool numeric_is_inf(Numeric num)
static Datum NumericGetDatum(Numeric X)
static Datum PointerGetDatum(const void *X)