Re: [HACKERS] Same expression more than once in partition key

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: [HACKERS] Same expression more than once in partition key
Дата
Msg-id
CA+TgmoZ34d_m5j8LSa5yfHfUDHtqW4uPX93r3EF9rm_vUj5i1A@mail.gmail.com
Ответ на
Список
Дерево обсуждения
[HACKERS] Same expression more than once in partition key Yugo Nagata <nagata@sraoss.co.jp>
Re: [HACKERS] Same expression more than once in partition key Yugo Nagata <nagata@sraoss.co.jp>
Re: [HACKERS] Same expression more than once in partition key Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Same expression more than once in partition key Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] Same expression more than once in partition key Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Same expression more than once in partition key Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: [HACKERS] Same expression more than once in partition key Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Same expression more than once in partition key Yugo Nagata <nagata@sraoss.co.jp>
On Fri, Jun 23, 2017 at 4:04 PM, Tom Lane  wrote:
> Peter Eisentraut  writes:
>> We also allow the same column more than once in an index.  We probably
>> don't have to be more strict here.
>
> There actually are valid uses for the same column more than once in
> an index, eg if you use a different operator class for each instance.
> I find it hard to envision a similar use-case in partitioning though.

Maybe you already realize this, but partitioning, like index creation,
allows an opclass to be specified:

rhaas=# create table foo (a text, b text) partition by range (a
text_ops, b text_pattern_ops);
CREATE TABLE

I don't really see anybody wanting to do that, but I don't really see
anyone wanting to do with an index either.

My inclination is to reject this patch as not solving any actual problem.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления
От: Amit Kapila
Дата:
От: sanyam jain
Дата:
FAQ