1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

bpchar, varchar, bytea, numeric are toastable --- if you initdb, which

I did not force.  I marked numeric as compressable-but-not-move-off-able,
partly to test that storage mode and partly because I've got doubts
that numerics are large enough to need external storage.
This commit is contained in:
Tom Lane
2000-07-29 03:26:51 +00:00
parent 20f6a1e562
commit 1ebe1da296
10 changed files with 825 additions and 851 deletions

View File

@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------
* formatting.c
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.19 2000/07/05 23:11:35 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.20 2000/07/29 03:26:41 tgl Exp $
*
*
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@ -4066,7 +4066,9 @@ numeric_to_char(PG_FUNCTION_ARGS)
x = DatumGetNumeric(DirectFunctionCall2(numeric_round,
NumericGetDatum(value),
Int32GetDatum(0)));
numstr = orgnum = int_to_roman(numeric_int4(x));
numstr = orgnum =
int_to_roman(DatumGetInt32(DirectFunctionCall1(numeric_int4,
NumericGetDatum(x))));
pfree(x);
}
else
@ -4080,8 +4082,12 @@ numeric_to_char(PG_FUNCTION_ARGS)
Numeric b = DatumGetNumeric(DirectFunctionCall1(int4_numeric,
Int32GetDatum(Num.multi)));
x = numeric_power(a, b);
val = numeric_mul(value, x);
x = DatumGetNumeric(DirectFunctionCall2(numeric_power,
NumericGetDatum(a),
NumericGetDatum(b)));
val = DatumGetNumeric(DirectFunctionCall2(numeric_mul,
NumericGetDatum(value),
NumericGetDatum(x)));
pfree(x);
pfree(a);
pfree(b);