From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pointless check in RelationBuildPartitionDesc |
Date: | 2018-09-04 01:19:56 |
Message-ID: | 20180904011956.GB20696@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 04, 2018 at 09:47:07AM +0900, Amit Langote wrote:
> On 2018/09/04 6:39, Alvaro Herrera wrote:
>> After looking, it seems that this is just self-inflicted pain: for some
>> reason, we store the pg_inherits row for a partition, and immediately
>> afterwards compute and store its partition bound, which requires the
>> above hack. But if we do things in the opposite order, this is no
>> longer needed. I propose to remove it, as in the attached patch.
>
> +1. I remember having facepalmed at this before and had also written a
> patch but never got around to submitting it.
Ok, I see. It seems to me that this could be replaced by an
elog(ERROR), as relispartition ought to be set anyway. This way any
future callers would get things done in the correct order.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2018-09-04 01:23:19 | Re: pointless check in RelationBuildPartitionDesc |
Previous Message | Tom Lane | 2018-09-04 00:57:33 | Re: libpq debug log |