Skip to content

Commit 1ebe1da

Browse files
committed
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.
1 parent 20f6a1e commit 1ebe1da

File tree

10 files changed

+727
-753
lines changed

10 files changed

+727
-753
lines changed

src/backend/commands/trigger.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.72 2000/07/03 03:57:03 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.73 2000/07/29 03:26:40 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -240,12 +240,14 @@ CreateTrigger(CreateTrigStmt *stmt)
240240
strcat(args, "\\000");
241241
}
242242
values[Anum_pg_trigger_tgnargs - 1] = Int16GetDatum(nargs);
243-
values[Anum_pg_trigger_tgargs - 1] = PointerGetDatum(byteain(args));
243+
values[Anum_pg_trigger_tgargs - 1] = DirectFunctionCall1(byteain,
244+
CStringGetDatum(args));
244245
}
245246
else
246247
{
247248
values[Anum_pg_trigger_tgnargs - 1] = Int16GetDatum(0);
248-
values[Anum_pg_trigger_tgargs - 1] = PointerGetDatum(byteain(""));
249+
values[Anum_pg_trigger_tgargs - 1] = DirectFunctionCall1(byteain,
250+
CStringGetDatum(""));
249251
}
250252
MemSet(tgattr, 0, FUNC_MAX_ARGS * sizeof(int16));
251253
values[Anum_pg_trigger_tgattr - 1] = PointerGetDatum(tgattr);

src/backend/utils/adt/formatting.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.19 2000/07/05 23:11:35 tgl Exp $
4+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.20 2000/07/29 03:26:41 tgl Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@@ -4066,7 +4066,9 @@ numeric_to_char(PG_FUNCTION_ARGS)
40664066
x = DatumGetNumeric(DirectFunctionCall2(numeric_round,
40674067
NumericGetDatum(value),
40684068
Int32GetDatum(0)));
4069-
numstr = orgnum = int_to_roman(numeric_int4(x));
4069+
numstr = orgnum =
4070+
int_to_roman(DatumGetInt32(DirectFunctionCall1(numeric_int4,
4071+
NumericGetDatum(x))));
40704072
pfree(x);
40714073
}
40724074
else
@@ -4080,8 +4082,12 @@ numeric_to_char(PG_FUNCTION_ARGS)
40804082
Numeric b = DatumGetNumeric(DirectFunctionCall1(int4_numeric,
40814083
Int32GetDatum(Num.multi)));
40824084

4083-
x = numeric_power(a, b);
4084-
val = numeric_mul(value, x);
4085+
x = DatumGetNumeric(DirectFunctionCall2(numeric_power,
4086+
NumericGetDatum(a),
4087+
NumericGetDatum(b)));
4088+
val = DatumGetNumeric(DirectFunctionCall2(numeric_mul,
4089+
NumericGetDatum(value),
4090+
NumericGetDatum(x)));
40854091
pfree(x);
40864092
pfree(a);
40874093
pfree(b);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy