From 5a73e17317e91912b2755f7960d5bf31d374cf31 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Fri, 3 Mar 2017 09:07:41 +0530 Subject: Improve error reporting for tuple-routing failures. Currently, the whole row is shown without column names. Instead, adopt a style similar to _bt_check_unique() in ExecFindPartition() and show the failing key: (key1, ...) = (val1, ...). Amit Langote, per a complaint from Simon Riggs. Reviewed by me; I also adjusted the grammar in one of the comments. Discussion: http://postgr.es/m/9f9dc7ae-14f0-4a25-5485-964d9bfc19bd@lab.ntt.co.jp --- src/include/catalog/partition.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/include/catalog/partition.h') diff --git a/src/include/catalog/partition.h b/src/include/catalog/partition.h index b195d1a5ab4..421644ca775 100644 --- a/src/include/catalog/partition.h +++ b/src/include/catalog/partition.h @@ -85,8 +85,14 @@ extern List *RelationGetPartitionQual(Relation rel); extern PartitionDispatch *RelationGetPartitionDispatchInfo(Relation rel, int lockmode, int *num_parted, List **leaf_part_oids); +extern void FormPartitionKeyDatum(PartitionDispatch pd, + TupleTableSlot *slot, + EState *estate, + Datum *values, + bool *isnull); extern int get_partition_for_tuple(PartitionDispatch *pd, TupleTableSlot *slot, EState *estate, - Oid *failed_at); + PartitionDispatchData **failed_at, + TupleTableSlot **failed_slot); #endif /* PARTITION_H */ -- cgit v1.2.3