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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] NUMERIC type conversions leave much to be desired
Дата
Msg-id 2145.926265844@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:
> OK, and while I was looking at it I noticed that the T_Integer code
> didn't bother using the int4out() routine to generate a string. imho
> it should be using the official output routine unless there is some
> compelling reason not to. It seems to still behave with this fix in
> the T_Integer support code; should I commit both?

One potential problem is that if the value is large/small enough to make
float8out use 'E' notation, conversion to numeric will still fail ---
this is the same problem you hacked around in float8_numeric() earlier.

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.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Niladic functions
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] Niladic functions