aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-02-21 18:47:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-02-21 18:47:12 +0000
commit393f313227fba2b7905cfbd69b3e4c18d762bf4f (patch)
tree0eab81bd6705a19b625880d9b5cefb1d50c78d78 /src/backend/nodes/copyfuncs.c
parentee97d103ccf68ae45343caea4188ca3dd5ce7365 (diff)
downloadpostgresql-393f313227fba2b7905cfbd69b3e4c18d762bf4f.tar.gz
postgresql-393f313227fba2b7905cfbd69b3e4c18d762bf4f.zip
Change parse-time representation of float literals (which include oversize
integers) to be strings instead of 'double'. We convert from string form to internal representation only after type resolution has determined the correct type for the constant. This eliminates loss-of-precision worries and gets rid of the change in behavior seen at 17 digits with the previous kluge.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index fbef91b35d8..601b503ec11 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.107 2000/02/20 21:32:05 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.108 2000/02/21 18:47:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1501,14 +1501,12 @@ _copyValue(Value *from)
newnode->type = from->type;
switch (from->type)
{
- case T_String:
- newnode->val.str = pstrdup(from->val.str);
- break;
case T_Integer:
newnode->val.ival = from->val.ival;
break;
case T_Float:
- newnode->val.dval = from->val.dval;
+ case T_String:
+ newnode->val.str = pstrdup(from->val.str);
break;
default:
break;
@@ -1722,8 +1720,8 @@ copyObject(void *from)
* VALUE NODES
*/
case T_Integer:
- case T_String:
case T_Float:
+ case T_String:
retval = _copyValue(from);
break;
case T_List: