aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/formatting.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-06-05 07:29:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-06-05 07:29:25 +0000
commit48165ec2262b73c5b81a6caabab66d883d013a83 (patch)
tree08e878a2a1e7f76981406ac2b34729a510aecac6 /src/backend/utils/adt/formatting.c
parentc61db5ba2decf2e620f6ce3699d4b702957ed72a (diff)
downloadpostgresql-48165ec2262b73c5b81a6caabab66d883d013a83.tar.gz
postgresql-48165ec2262b73c5b81a6caabab66d883d013a83.zip
Latest round of fmgr updates. All functions with bool,char, or int2
inputs have been converted to newstyle. This should go a long way towards fixing our portability problems with platforms where char and short parameters are passed differently from int-width parameters. Still more to do for the Alpha port however.
Diffstat (limited to 'src/backend/utils/adt/formatting.c')
-rw-r--r--src/backend/utils/adt/formatting.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index 8d204a15957..674bbefea54 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------
* formatting.c
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.8 2000/04/12 17:15:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.9 2000/06/05 07:28:51 tgl Exp $
*
*
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@@ -4048,11 +4048,15 @@ int4_to_char(int32 value, text *fmt)
{
if (IS_MULTI(&Num))
{
- orgnum = int4out(int4mul(value, (int32) pow((double) 10, (double) Num.multi)));
+ orgnum = DatumGetCString(DirectFunctionCall1(int4out,
+ Int32GetDatum(value * ((int32) pow((double) 10, (double) Num.multi)))));
Num.pre += Num.multi;
}
else
- orgnum = int4out(value);
+ {
+ orgnum = DatumGetCString(DirectFunctionCall1(int4out,
+ Int32GetDatum(value)));
+ }
len = strlen(orgnum);
if (*orgnum == '-')