Re: message for constraint

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: message for constraint
Дата
Msg-id c2d9e70e0601140817y69d1f2dap6a0bab0e2bf849b1@mail.gmail.com
обсуждение исходный текст
Ответ на Re: message for constraint  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On 1/14/06, Peter Eisentraut <peter_e@gmx.net> wrote:
> 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/
>

ok, i didn't know you can use such names...

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)


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

Предыдущее
От: mark@mark.mielke.cc
Дата:
Сообщение: Re: Surrogate keys (Was: enums)
Следующее
От: Denis Lussier
Дата:
Сообщение: Re: PG process architecture