public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Tom Lane <[email protected]>
Cc: Valerio Battaglia <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: How to get column, table or parameter name reporting when violating DOMAIN type constraint
Date: Sun, 26 Mar 2023 08:36:58 -0700
Message-ID: <CAKFQuwa00CR2HPxmngsGqx0mGOc4j215gZ4j_v32OYO_gfpQYg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CACxJNSkpT8vC0jnsfObZDargLA1vCiP-VKF2ji9y58VaAOSpVA@mail.gmail.com>
	<CAKFQuwYJtF-5Uvqo6ahKkeEAxOKta_yVb3n3at5Y=mvSgC0FrA@mail.gmail.com>
	<[email protected]>

On Sunday, March 26, 2023, Tom Lane <[email protected]> wrote:

> "David G. Johnston" <[email protected]> writes:
> > On Sunday, March 26, 2023, Valerio Battaglia <[email protected]> wrote:
> >> Is there a way to obtain more detailed information about the column,
> table
> >> or parameter that is causing the constraint violation in this scenario?
> I
> >> would greatly appreciate any guidance or advice you could provide on
> this
> >> matter
>
> > What you see is what you get.
>
> More to the point, you have the wrong mental model: a domain constraint
> violation might not be associated with a table column at all.
>
>
I disagree that the mental model is wrong.  Asking for better context when
constructing rows is a common request not only for domains but even simple
data types like dates or numbers.  Sure, that added context is not always
applicable but when it is the lack of error detail does make life hard.
But it isn’t an easy problem to solve either.

There are existing threads that I may hunt later.  IIRC, you (Tom) even
suggested a possible way forward on this last time it came up.

David J.


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: How to get column, table or parameter name reporting when violating DOMAIN type constraint
  In-Reply-To: <CAKFQuwa00CR2HPxmngsGqx0mGOc4j215gZ4j_v32OYO_gfpQYg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox