Skip site navigation (1) Skip section navigation (2)

tuple-routing and constraint violation error message, revisited

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: tuple-routing and constraint violation error message, revisited
Date: 2017-03-31 02:13:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Last message regarding this was by Robert on the original partitioning thread:

Summary is: We decided in f1b4c771ea7 [1] that passing the original slot
(one containing the tuple formatted per root partitioned table's tupdesc)
to ExecConstraints(), but that breaks certain cases.  Imagine what would
happen if a BR insert trigger changed the tuple - the original slot would
not contain those changes. So, it seems better to convert (if necessary)
the tuple formatted per partition tupdesc after tuple-routing back to the
root table's format and use the converted tuple to make val_desc shown in
the message if an error occurs.

Attached rebased version of the patch that I had originally proposed
(summary above is the commit message).  Robert thought it would be fine to
show the row formatted per partition rowtype, but would look better if we
could show the column names as well (remember that we're trying to account
for possible differences in the ordering of columns between the root table
and leaf partitions to which tuples are routed.)

Added this to PostgreSQL 10 open items list.



Attachment: 0001-Fix-reporting-of-violation-in-ExecConstraints-again.patch
Description: text/x-diff (11.7 KB)


pgsql-hackers by date

Next:From: Dmitry DolgovDate: 2017-03-31 02:32:41
Subject: Re: [PATCH] Generic type subscripting
Previous:From: Mengxing LiuDate: 2017-03-31 01:41:43
Subject: Re: Guidelines for GSoC student proposals / Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group