From: | Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Problem on pg_dump RANGE partition with expressions |
Date: | 2018-07-13 09:45:02 |
Message-ID: | 20180713184502.1845a326.nagata@sraoss.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 12 Jul 2018 17:44:48 +0900
Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> > 1) Allow to appear more than once in range partition key
> >
> > I don't understand why there is this restriction. If we have no clear reason,
> > can we rip out this restrition?
>
> I can't recall exactly, but back when I wrote this code, I might have been
> thinking that such a feature is useless and would actually just end up
> being a foot gun for users.
>
> Although, I'm open to ripping it out if it's seen as being overly restrictive.
I think this way is good to resolve this, because allowing columns to appear more
than once would be harmless at least with the current partitioning methods,
range and hash, although this is useless.
Actually, we currenly allow same expression apears more than once in partition key
like
create table t (i int) partition by range((i+1),(i+1));
In the past, I proposed a patch to forbid this, but this is rejected
since there is harmless and no need to restrict this.
Attached is a patch to get rid of "appears more than once" restriction.
Regards,
--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Attachment | Content-Type | Size |
---|---|---|
allow_column_appears_more_than_once.patch | text/x-diff | 908 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Yugo Nagata | 2018-07-13 09:50:55 | Re: Temporary WAL segments files not cleaned up after an instance crash |
Previous Message | Kato, Sho | 2018-07-13 09:08:00 | RE: How to make partitioning scale better for larger numbers of partitions |