On 7 June 2018 at 16:05, Amit Langote <langote_amit...@lab.ntt.co.jp> wrote: > Or we could just not have a separate function and put the logic that > determines whether or not to check the partition constraint right before > the following piece of code in ExecConstraints > > if (check_partition_constraint && resultRelInfo->ri_PartitionCheck && > !ExecPartitionCheck(resultRelInfo, slot, estate)) > ExecPartitionCheckEmitError(resultRelInfo, slot, estate);
I don't think so. The function Alvaro is talking about is specific to inserting a tuple into a table. The place you're proposing to put the call to it is not. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services