diff options
author | Marc G. Fournier <scrappy@hub.org> | 1996-08-13 01:29:34 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1996-08-13 01:29:34 +0000 |
commit | 59f29714aa8d084bdb3f96b87ee03775d7e2b865 (patch) | |
tree | 2a5e03ddc804c55180924e6c6636cb9fb632d6ee /src/backend/parser/parse_query.c | |
parent | 9b7eb28ea5ebdea8ea92944f036b7c0409abd62f (diff) |
Fixes:
This patch forces postgres95 to assume any floating-point value is a
float8. It removes the requirement that you cast all floating-point
constants to float8.
We can remove alot of casts in the regression test after we are sure
this works.
If I have missed anything, would someone let me know. I have tested
inserts of floating-point values into float8 fields, and it worked well.
Casting the number to float4 showed the same precision loss as previous
uncast values showed.
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
Diffstat (limited to 'src/backend/parser/parse_query.c')
-rw-r--r-- | src/backend/parser/parse_query.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/parser/parse_query.c b/src/backend/parser/parse_query.c index 974238aed47..600b7e78784 100644 --- a/src/backend/parser/parse_query.c +++ b/src/backend/parser/parse_query.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.2 1996/07/19 07:24:09 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.3 1996/08/13 01:29:34 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -594,13 +594,13 @@ make_const(Value *value) case T_Float: { - float32 dummy; - tp = type("float4"); + float64 dummy; + tp = type("float8"); - dummy = (float32)palloc(sizeof(float32data)); + dummy = (float64)palloc(sizeof(float64data)); *dummy = floatVal(value); - val = Float32GetDatum(dummy); + val = Float64GetDatum(dummy); } break; |