File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
1
/* -----------------------------------------------------------------------
2
2
* formatting.c
3
3
*
4
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.8.2.1 2000/10/19 18:39:03 tgl Exp $
4
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.8.2.2 2000/10/22 19:19:42 tgl Exp $
5
5
*
6
6
*
7
7
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@@ -4006,6 +4006,9 @@ numeric_to_char(Numeric value, text *fmt)
4006
4006
* p ;
4007
4007
Numeric x = NULL ;
4008
4008
4009
+ if (!value )
4010
+ return textin ("" );
4011
+
4009
4012
NUM_TOCHAR_prepare ;
4010
4013
4011
4014
/* ----------
@@ -4089,7 +4092,7 @@ int4_to_char(int32 value, text *fmt)
4089
4092
plen = 0 ,
4090
4093
sign = 0 ;
4091
4094
char * numstr ,
4092
- * orgnum ;
4095
+ * orgnum ;
4093
4096
4094
4097
NUM_TOCHAR_prepare ;
4095
4098
@@ -4170,6 +4173,9 @@ int8_to_char(int64 *value, text *fmt)
4170
4173
char * numstr ,
4171
4174
* orgnum ;
4172
4175
4176
+ if (!value )
4177
+ return textin ("" );
4178
+
4173
4179
NUM_TOCHAR_prepare ;
4174
4180
4175
4181
/* ----------
@@ -4252,6 +4258,9 @@ float4_to_char(float32 value, text *fmt)
4252
4258
* orgnum ,
4253
4259
* p ;
4254
4260
4261
+ if (!value )
4262
+ return textin ("" );
4263
+
4255
4264
NUM_TOCHAR_prepare ;
4256
4265
4257
4266
if (IS_ROMAN (& Num ))
@@ -4330,6 +4339,9 @@ float8_to_char(float64 value, text *fmt)
4330
4339
* orgnum ,
4331
4340
* p ;
4332
4341
4342
+ if (!value )
4343
+ return textin ("" );
4344
+
4333
4345
NUM_TOCHAR_prepare ;
4334
4346
4335
4347
if (IS_ROMAN (& Num ))
You can’t perform that action at this time.
0 commit comments