From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com> |
Subject: | Re: Needless additional partition check in INSERT? |
Date: | 2018-05-14 04:49:52 |
Message-ID: | 26e90dc4-9023-7b0d-67c1-5604e4bcd6f3@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2018/05/11 18:43, Amit Khandekar wrote:
> This looks better (it will avoid unnecessary ExecConstraints() call) :
>
> if (resultRelInfo->ri_PartitionRoot == NULL ||
> (resultRelInfo->ri_TrigDesc &&
> resultRelInfo->ri_TrigDesc->trig_insert_before_row))
> check_partition_constr = resultRelInfo->ri_PartitionCheck;
You'd be assigning a List pointer to a bool variable with this. Maybe you
meant:
check_partition_constr = (resultRelInfo->ri_PartitionCheck != NIL);
Thanks,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2018-05-14 04:51:25 | Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled. |
Previous Message | Thomas Munro | 2018-05-14 04:27:29 | Re: Compiler warnings with --enable-dtrace |