Redundant check of em_is_child

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Redundant check of em_is_child
Date: 2017-05-19 07:46:39
Message-ID: 0b4aca64-5098-dfb4-3b13-7325d2414b69@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In match_eclasses_to_foreign_key_col(), there is this:

if (em->em_is_child)
continue; /* ignore children here */

ISTM, it might as well be:

Assert(!em->em_is_child); /* no children yet */

That's because, I think it's still too early in query_planner() to be
expecting any child EC members.

Thanks,
Amit

Attachment Content-Type Size
fkey-ec-match-no-child-assert-1.patch text/x-diff 588 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pierre-Emmanuel André 2017-05-19 09:03:36 PostgreSQL 10beta1 - compilation fails on OpenBSD -current
Previous Message Higuchi, Daisuke 2017-05-19 07:05:30 Re: [Bug fix]If recovery.conf has target_session_attrs=read-write, the standby fails to start.