Re: UniqueKey on Partitioned table.

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: UniqueKey on Partitioned table.
Дата
Msg-id CAExHW5tN=y8+uY=7-rXLSSM-ebmRVe6nRUBSBVshpULpBa5zvA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: UniqueKey on Partitioned table.  (Andy Fan <zhihui.fan1213@gmail.com>)
Ответы Re: UniqueKey on Partitioned table.  (Andy Fan <zhihui.fan1213@gmail.com>)
Список pgsql-hackers
> b).  How to present the element
> in UniqueKey.  Prue EquivalenceClasses or Mix of Expr and EquivalenceClass as
> we just talked about.
I think the reason we add ECs for sort expressions is to use
transitive relationship. The EC may start with a single member but
later in the planning that member might find partners which are all
equivalent. Result ordered by one is also ordered by the other. The
same logic applies to UniqueKey as well, isn't it. In a result if a
set of columns makes a row unique, the set of columns represented by
the other EC member should be unique. Though a key will start as a
singleton it might EC partners later and thus thus unique key will
transition to all the members. With that logic UniqueKey should use
just ECs instead of bare expressions.

-- 
Best Wishes,
Ashutosh Bapat



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Flaky vacuum truncate test in reloptions.sql