Jaime Casanova wrote:
> From time to time people ask me if there is a way to "customize"
> messages for constraints so they could be more informative to the
> user...
What about this?
=> create table foo (fld int4 constraint "fld must contain positive numbers" check (fld > 0));
CREATE TABLE
=> insert into foo values (-5);
ERROR: new row for relation "foo" violates check constraint "fld must contain positive numbers"
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.