On Tue, Jun 6, 2017 at 2:41 PM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> Consider an example using the partition hierarchy:
>
> root (a int, b char, c int) partition by range (a)
>
> -> level1 from (1) to (10) partition by list (b)
>
> -> level2 in ('a') parition by range (c)
>
> -> leaf from (1) to (10)
>
> Inserting (1, 'b', 1) into level1 will fail, because tuple can't be routed
> at level1 (no partition defined for b = 'b').
>
> Inserting (1, 'a', 10) into level1 will fail, because tuple can't be
> routed at level2 (no partition defined for c >= 10).
>
> Inserting (10, 'a', 1) into level1 will fail, because, although it was
> able to get through level1 and level2 into leaf, a = 10 falls out of
> level1's defined range. We don't check that 1 <= a < 10 before starting
> the tuple-routing.
>
> I wonder if we should... Since we don't allow BR triggers on partitioned
> tables, there should not be any harm in doing it just before calling
> ExecFindPartition(). Perhaps, topic for a new thread.
Yeah, correct.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com