Re: Abbreviated keys for Numeric

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: Abbreviated keys for Numeric
Дата
Msg-id 871tk1w5hy.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: Abbreviated keys for Numeric  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Abbreviated keys for Numeric  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
>>>>> "Robert" == Robert Haas <robertmhaas@gmail.com> writes:
>> I don't consider it appropriate to override ./configure in this way.
Robert> I don't see how that's overriding configure.  CommitRobert> 8472bf7a73487b0535c95e299773b882f7523463, which
introducedRobert>--disable-float8-byval in 2008, states that the motivation forRobert> this is that it might break
functionsusing the version 0Robert> calling convention.  It should not propagate, like kudzu, intoRobert> things that
havingnothing to do with how values are passed toRobert> V0 functions.
 

It already does; it changes how int64 values are expected to be stored
in Datum variables. _Everything_ that currently stores an int64 value in
a Datum is affected.

As I see it, you need a really good reason to override that in a
specific case, and supporting 64-bit abbreviations on a
--disable-float8-byval build really isn't a good reason (since 32-bit
abbrevs work fine and such builds should be vanishingly rare anyway).

The fact that making this one low-benefit change has introduced no less
than three separate bugs - the compile error with that #ifdef, the use
of Int64GetDatum for NANs, and the use of Int64GetDatum for the return
value of the abbreviation function should possibly be taken as a hint to
how bad an idea is.

If you're determined to go this route - over my protest - then you need
to do something like define a NumericAbbrevGetDatum(x) macro and use it
in place of the Int64GetDatum / Int32GetDatum ones for both NAN and the
return from numeric_abbrev_convert_var.

-- 
Andrew (irc:RhodiumToad)



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: initdb -S and tablespaces
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Abbreviated keys for Numeric