Re: AW: type conversion discussion
От | Tom Lane |
---|---|
Тема | Re: AW: type conversion discussion |
Дата | |
Msg-id | 26719.958399864@sss.pgh.pa.us обсуждение исходный текст |
Ответы |
Re: AW: type conversion discussion
|
Список | pgsql-hackers |
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.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
В списке pgsql-hackers по дате отправления: