mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
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.
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user