Re: [HACKERS] NUMERIC type conversions leave much to be desired

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] NUMERIC type conversions leave much to be desired
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] New version of CVSup built for linux