message for constraint

From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: message for constraint
Date: 2006-01-14 04:53:20
Message-ID: c2d9e70e0601132053o7f5a6813u35228374608c44df@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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 numbers only.';

so i can let this message go directly to my users, and they can
respond without knowing waht a check constraint is...

we can use the pg_description catalog with a column added to indicate
if it is a comment or a message for constraint...

what do you think, it's worth the effort?

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-01-14 09:13:47 Re: message for constraint
Previous Message Tom Lane 2006-01-14 04:37:38 Re: Improving N-Distinct estimation by ANALYZE

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2006-01-14 09:13:47 Re: message for constraint
Previous Message Tom Lane 2006-01-13 22:20:14 Re: Fix overflow of bgwriter's request queue