Re: Domain Constraint Violation Error Messages

Поиск
Список
Период
Сортировка
От Benjamin Coutu
Тема Re: Domain Constraint Violation Error Messages
Дата
Msg-id 20180725155145.BCBFB5FB09@mx.zeyos.com
обсуждение исходный текст
Ответ на Domain Constraint Violation Error Messages  (Benjamin Coutu <ben.coutu@zeyos.com>)
Ответы Re: Domain Constraint Violation Error Messages  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
> postgres[15271][1]=# \set VERBOSITY verbose
> postgres[15271][1]=# INSERT INTO myusers (name, email, token) VALUES('', 'b', 'x');
> ERROR:  23514: value for domain t_txt violates check constraint "dc_txt"
> SCHEMA NAME:  public
> DATATYPE NAME:  t_txt
> CONSTRAINT NAME:  dc_txt
> LOCATION:  ExecEvalConstraintCheck, execExprInterp.c:3521
> Time: 0.503 ms
>
> That seems to address most of your complaint? Unfortunately the column
> name is not available, as check constraints can involve more than one
> column.
>

Well, the problem is that the underlying column is not referenced, and neither is the table. That's the issue right
there.

Also, I'm aware that regular table constraints can reference multiple columns. But it is my understanding that check
constrainton domains may only always refer to one column (through VALUE), right? In any case it would be useful to at
leastdisplay the underlying table name. 

In general, I understand that it is not trivial given the generic/unified use of constraints whether it's column
constraints,table constraints or domain constraints. I'm not giving up hope though, that the column info can be
propagatedat least for single column constraints and more importantly for domain constraints. 


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

Предыдущее
От: Ze Victor Harry
Дата:
Сообщение: Re: mvn package not installing/error
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Domain Constraint Violation Error Messages