On 2018/07/02 14:46, Ashutosh Bapat wrote: > This constraint was added to the partitioned table and inherited from > there. If user wants to drop that constraint for some reason, this > error message doesn't help. The error message tells why he can't drop > it, but doesn't tell, directly or indirectly, the user what he should > do in order to drop it. When there was only a single way, i.e table > inheritance, to "inherit" things users could probably guess that. But > now there are multiple ways to inherit things, we have to help user a > bit more. The user might figure out that ti's a partition of a table, > so the constraint is inherited from the partitioned table. But it will > help if we give a hint about from where the constraint was inherited > like the error message itself reads like "can not drop constraint > "p_a_check" on relation "p1" inherited from "partitioned table's name" > OR a hint "you may drop constraint "p_a_check" on the partitioned > table "partitioned table's name". It might even suffice to say > "partition p1" instead "relation p1" so that the user gets a clue.
It might be a good idea to mention if the table is a partition in the HINT message. ERROR message can remain the same. Thanks, Amit