From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guancheng Luo <prajnamort@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [PATCH] Check operator when creating unique index on partition table
Date: Wed, 01 Apr 2020 14:53:09 -0400
Message-ID: <20082.1585767189@sss.pgh.pa.us> (raw)
In-Reply-To: <B63F443B-C5CC-4590-8011-EF3E5BB17823@gmail.com>
References: <D9C3CEF7-04E8-47A1-8300-CA1DCD5ED40D@gmail.com>
<4731.1585155636@sss.pgh.pa.us>
<B63F443B-C5CC-4590-8011-EF3E5BB17823@gmail.com>
Guancheng Luo <prajnamort@gmail.com> writes:
> On Mar 26, 2020, at 01:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> This would reject, for example, a hash index associated with a btree-based
>> partition constraint, but I'm not sure we're losing anything much thereby.
> There is cases when a BTREE index associated with a HASH partition key, but I think we should allow them,
> as long as their equality operators consider the same value as equal.
Ah, yeah, I see we already have regression test cases that require that.
I pushed the patch with some cosmetic revisions. I left out the
regression test case though; it seemed pretty expensive considering
that the code is already being exercised by existing cases.
Thanks for the report and patch!
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, prajnamort@gmail.com
Subject: Re: [PATCH] Check operator when creating unique index on partition table
In-Reply-To: <20082.1585767189@sss.pgh.pa.us>
References: <D9C3CEF7-04E8-47A1-8300-CA1DCD5ED40D@gmail.com> <4731.1585155636@sss.pgh.pa.us> <B63F443B-C5CC-4590-8011-EF3E5BB17823@gmail.com> <20082.1585767189@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox