Re: [HACKERS] NUMERIC type conversions leave much to be desired
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] NUMERIC type conversions leave much to be desired |
| Дата | |
| Msg-id | 3345.926286116@sss.pgh.pa.us обсуждение |
| Ответ на | Re: [HACKERS] NUMERIC type conversions leave much to be desired (Thomas Lockhart <lockhart@alumni.caltech.edu>) |
| Список | pgsql-hackers |
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> I still like the idea of hanging on to the original string form of the
>> constant long enough so that parser_typecast can feed that directly to
>> the target type's xxx_in() routine, and not have to worry about
>> conversion errors.
> I agree. I'm just worried about losing the typing hints provided by
> scan.l if we went to a "string only" solution.
No no, I didn't say that you can't keep T_Integer and T_Float nodes
separate. I was just suggesting that the *value* of one of these nodes
might be kept as a string (or, perhaps, both as a string and the numeric
format). That way, if you need to convert to some other type, you start
from the original string and don't have to risk a "lossy compression"
into floating point.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера