Re: interval_ops shall stop using btequalimage (deduplication)

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: interval_ops shall stop using btequalimage (deduplication)
Дата
Msg-id CAH2-WzkJYoBDx8Yc3Nhmhc9H9pN0Uz9_tmXn-pr12CSU7JgAsA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: interval_ops shall stop using btequalimage (deduplication)  (Donghang Lin <donghanglin@gmail.com>)
Список pgsql-hackers
On Mon, Oct 16, 2023 at 11:21 PM Donghang Lin <donghanglin@gmail.com> wrote:
> It seems to me that as long as a data type has a deterministic sort but not necessarily be equalimage,
> it should be able to support deduplication.  e.g for interval type, we add a byte wise tie breaker
> after '24h' and '1day' are compared equally. In the btree, '24h' and '1day' are still adjacent,
> '1day' is always sorted before '24h' in a btree page, can we do dedup for each value
> without problem?
> The assertion will still be triggered as it's testing btequalimage, but I'll defer it for now.
> Wanted to know if the above idea sounds sane first...

 It's hard to give any one reason why this won't work. I'm sure that
with enough effort some scheme like this could work. It's just that
there are significant practical problems that at least make it seem
unappealing as a project. This has been discussed before:


https://www.postgresql.org/message-id/flat/CAH2-WzkZkSC7G%2Bv1WwXGo0emh8E-rByw%3DxSpBUoavk7PTjwF2Q%40mail.gmail.com#4e98cba0d76c8c8c0bf67ae0d4652903

--
Peter Geoghegan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL domains and NOT NULL constraint
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Patch: Improve Boolean Predicate JSON Path Docs