mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
Use ISO dates in pgtypeslib by default.
Applied patch by Philip Yarra to fix some thread issues. Added a new data type "decimal" which is mostly the same as our "numeric" but uses a fixed length array to store the digits. This is for compatibility with Informix and maybe others.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.9 2003/06/26 11:37:05 meskes Exp $ */
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.10 2003/07/01 12:40:51 meskes Exp $ */
|
||||
|
||||
#define POSTGRES_ECPG_INTERNAL
|
||||
#include "postgres_fe.h"
|
||||
@ -398,6 +398,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
|
||||
}
|
||||
break;
|
||||
|
||||
case ECPGt_decimal:
|
||||
case ECPGt_numeric:
|
||||
if (pval)
|
||||
{
|
||||
@ -419,7 +420,10 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
|
||||
else
|
||||
nres = PGTYPESnumeric_from_asc("0.0", &scan_length);
|
||||
|
||||
PGTYPESnumeric_copy(nres, (Numeric *)(var + offset * act_tuple));
|
||||
if (type == ECPGt_numeric)
|
||||
PGTYPESnumeric_copy(nres, (Numeric *)(var + offset * act_tuple));
|
||||
else
|
||||
PGTYPESnumeric_to_decimal(nres, (Decimal *)(var + offset * act_tuple));
|
||||
break;
|
||||
|
||||
case ECPGt_interval:
|
||||
|
Reference in New Issue
Block a user