Re: [HACKERS] Same expression more than once in partition key - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Same expression more than once in partition key
Date
Msg-id CA+TgmoZ34d_m5j8LSa5yfHfUDHtqW4uPX93r3EF9rm_vUj5i1A@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Same expression more than once in partition key  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jun 23, 2017 at 4:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> 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 by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Pluggable storage
Next
From: sanyam jain
Date:
Subject: Re: [HACKERS] pgjdbc logical replication client throwing exception