Re: Index tuple deduplication limitations in pg13

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Index tuple deduplication limitations in pg13
Дата
Msg-id CAH2-WzkZkSC7G+v1WwXGo0emh8E-rByw=xSpBUoavk7PTjwF2Q@mail.gmail.com
обсуждение исходный текст
Ответ на Index tuple deduplication limitations in pg13  (Matthias van de Meent <matthias.vandemeent@cofano.nl>)
Ответы Re: Index tuple deduplication limitations in pg13  (Peter Geoghegan <pg@bowt.ie>)
Re: Index tuple deduplication limitations in pg13  (Matthias van de Meent <matthias.vandemeent@cofano.nl>)
Список pgsql-general
On Mon, Aug 17, 2020 at 11:44 PM Matthias van de Meent
<matthias.vandemeent@cofano.nl> wrote:
> But, if the ordering of operator-class equal tuples is already
> system-defined, could the physical ordering of index tuples in a btree
> (with deduplication enabled for "unsafe" opclasses) be updated from
> [index_columns, tid] to [index_columns,
> image_compare(non_datum_equal_columns), tid], giving a stable sorting
> of opclass-equal and image-equal values and enabling safe consistent
> deduplication?

The issue isn't the physical ordering. The issue is that we cannot
allow the implementation to destroy semantic differences among equal
datums. We avoid deduplication with cases where two equal datums are
visibly different. For example, it would not be okay if we forgot that
your numeric datum was originally input as '5.000', and output '5'
later on.

If we wanted to fix this for numeric, we'd have to invent a new
numeric datatype (called numeric2, say). That probably isn't as hard
as it sounds, since it could be part of the same B-Tree operator
family as numeric. It could also be implicitly cast to numeric.

-- 
Peter Geoghegan



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: import XML
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Index tuple deduplication limitations in pg13