Re: [HACKERS] message for constraint

2006-01-14 Thread Jaime Casanova
On 1/14/06, Peter Eisentraut <[EMAIL PROTECTED]> 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 "f

Re: [HACKERS] message for constraint

2006-01-14 Thread Peter Eisentraut
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 => i

[HACKERS] message for constraint

2006-01-13 Thread Jaime Casanova
Hi, 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... Imagine something like: create table foo (fld int4 check (fld > 0)); message for constraint foo_fld_check on foo is 'fld field must contain possitive num