| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> |
| Cc: | "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: AW: type conversion discussion |
| Date: | 2000-05-15 14:11:04 |
| Message-ID: | 26719.958399864@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> writes:
> I think the topmost numeric-type needs to be numeric, since it is the
> only type with arbitrary scale and precision.
> Thus I think we would need:
> int2,int4,int8,float4,float8,numeric
No, this is wrong because it contradicts SQL92: float + numeric must
yield float, not numeric.
> But the above is still not correct, in the sence that e.g. int8 cannot be
> converted to float4
> without loss. In that sense I don't think one upward promotion info is
> sufficient.
An important component of the second proposal is that the actual data
conversion is done in one step if possible. We will *consider* using
float4 before we consider float8, but if we end up using float8 then
we try to do a direct whatever-to-float8 conversion. So as long as the
right set of conversion operators are available, there's no unnecessary
precision loss.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Martijn van Oosterhout | 2000-05-15 14:12:25 | Re: Dumping and reloading stuff in 6.5.3 |
| Previous Message | Thomas Lockhart | 2000-05-15 13:56:00 | Re: Cast of numeric() |