Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'
Дата
Msg-id 14988.950773126@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> I proposed a while back that T_Float tokens ought to carry the value in
>> string form, rather than actually converting it to float,

> No fair only doing it for float8; int4 has the same trouble.

Au contraire: int representation has no risk of loss of precision.
It does risk overflow, but we can detect that reliably, and in fact
scan.l already takes care of that scenario.

If we allow ints to retain their current representation, then the
manipulations currently done in gram.y don't need to change.  All
that's needed is to invoke the proper typinput function after we've
decided what type we really want to convert a T_Float to.  T_Float
would act kind of like UNKNOWN-type string constants, except that
the knowledge that the string looks numeric-ish could be used in
type selection heuristics.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Almost there on column aliases
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: [HACKERS] FYI: BNF for SQL93 and SQL-3