Re: How to get column, table or parameter name reporting when violating DOMAIN type constraint

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: How to get column, table or parameter name reporting when violating DOMAIN type constraint
Дата
Msg-id CAKFQuwa00CR2HPxmngsGqx0mGOc4j215gZ4j_v32OYO_gfpQYg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to get column, table or parameter name reporting when violating DOMAIN type constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: How to get column, table or parameter name reporting when violating DOMAIN type constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
On Sunday, March 26, 2023, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sunday, March 26, 2023, Valerio Battaglia <vabatta@gmail.com> 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.

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to get column, table or parameter name reporting when violating DOMAIN type constraint
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to get column, table or parameter name reporting when violating DOMAIN type constraint