Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] message for constraint

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] message for constraint
Date: 2006-01-16 19:54:32
Message-ID: 200601161954.k0GJsWh19910@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
I have added the following documentation addition to suggest this usage
for constraint names.

---------------------------------------------------------------------------

Jaime Casanova wrote:
> On 1/14/06, Peter Eisentraut <peter_e(at)gmx(dot)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 ;)
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2006-01-16 20:05:46
Subject: Re: Improving N-Distinct estimation by ANALYZE
Previous:From: Tom LaneDate: 2006-01-16 19:43:09
Subject: Re: Large Scale Aggregation (HashAgg Enhancement)

pgsql-patches by date

Next:From: Jaime CasanovaDate: 2006-01-16 20:44:25
Subject: Re: [HACKERS] message for constraint
Previous:From: Alvaro HerreraDate: 2006-01-16 16:43:58
Subject: Re: New pg_dump options: exclude tables/schemas, multiple all, wildcards

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group