Re: pointless check in RelationBuildPartitionDesc

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: pointless check in RelationBuildPartitionDesc
Дата
Msg-id cf59a3e0-519c-dbb0-083e-db183137b893@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: pointless check in RelationBuildPartitionDesc  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pointless check in RelationBuildPartitionDesc  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On 2018/09/04 10:19, Michael Paquier wrote:
> 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.

Converting it to elog(ERROR, ...) might be a good idea.

Thanks,
Amit



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pointless check in RelationBuildPartitionDesc
Следующее
От: Noah Misch
Дата:
Сообщение: Re: [HACKERS] Re: Improve OR conditions on joined columns (commonstar schema problem)