Re: REFERENCES error message complaint, suggestion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: REFERENCES error message complaint, suggestion
Дата
Msg-id 25767.1078413213@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: REFERENCES error message complaint, suggestion  ("Karl O. Pinc" <kop@meme.com>)
Ответы Re: REFERENCES error message complaint, suggestion  ("Karl O. Pinc" <kop@meme.com>)
Re: REFERENCES error message complaint, suggestion  ("Uwe C. Schroeder" <uwe@oss4u.com>)
Re: REFERENCES error message complaint, suggestion  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
"Karl O. Pinc" <kop@meme.com> writes:
> Does 7.4 do something similar with CHECK constraints?

Nope, just

regression=# create table baz(f1 int check (f1 > 0));
CREATE TABLE
regression=# insert into baz values(-1);
ERROR:  new row for relation "baz" violates check constraint "baz_f1"
regression=#

I think this is sufficient though, and that database designers ought to
choose helpful names for constraints.  I should have said something like
    ... constraint "f1 must be positive" check (f1 > 0)
if I were concerned about the error message quality.

I didn't care much for your suggestion of showing the constraint
expression, because to the average non-programmer it would just be
noise.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Are Postgres 7.4.1 RPMs available for SuSE 9.0 ?
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: META: Filtering viruses/worms