Re: Reducing the overhead of NUMERIC data

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Reducing the overhead of NUMERIC data
Дата
Msg-id 28946.1130884835@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Reducing the overhead of NUMERIC data  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Reducing the overhead of NUMERIC data  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> You are proposing a fourth type, say VARLENA2 which looks a lot like a
> verlena but it's not. I think the shear volume of code that would need
> to be checked is huge. Also, things like pg_attribute would need
> changing because you have to represent this new state somehow.

It wouldn't be an impossible amount of code --- for precedent see back
when we made cstring into a full-fledged datatype (cstring is already
a fourth option in your list BTW).  That patch wasn't all that large IIRC.
The issue in my mind is the performance implications of adding an
additional case to places that are already hotspots.  There were
compelling functional reasons to pay that price to make cstring work,
but "save 2 bytes per numeric" doesn't seem like it rises to that level.
Maybe if we had a few other datatypes that could also use the feature.
[ thinks... ]  inet/cidr comes to mind but I don't see any others.
The case seems a bit weak :-(
        regards, tom lane


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Reducing the overhead of NUMERIC data
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Reducing the overhead of NUMERIC data