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

Re: [HACKERS] message for constraint

From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
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 20:44:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
On 1/16/06, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> I have added the following documentation addition to suggest this usage
> for constraint names.
> ---------------------------------------------------------------------------
> --- 293,304 ----
>      <term><literal>CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable></literal></term>
>      <listitem>
>       <para>
> !       An optional name for a column or table constraint.  If the
> !       constraint is violated, the constraint name is present in error messages,
> !       so constraint names like <literal>"col must be positive"</> can be used
> !       to communicate helpful constraint information to client applications.
> !       (Double-quotes are required for constraint names that contain spaces.)
> !       If not specified, the system generates a name.
>       </para>
>      </listitem>
>     </varlistentry>

a lot better... thanx...

what about lower the context part of the messages for plpgsql
functions? that seems debug info for me... just an idea ;)

pruebas=# select prueba();
ERROR:  new row for relation "foo" violates check constraint "foo_fld_check"
CONTEXT:  SQL statement "insert into foo values (-1)"
PL/pgSQL function "prueba" line 2 at SQL statement

Jaime Casanova
(DBA: DataBase Aniquilator ;)

In response to


pgsql-hackers by date

Next:From: Jonathan GardnerDate: 2006-01-16 20:45:37
Subject: Re: source documentation tool doxygen
Previous:From: Tom LaneDate: 2006-01-16 20:38:23
Subject: Re: Improving N-Distinct estimation by ANALYZE

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2006-01-16 20:49:55
Subject: Re: [HACKERS] message for constraint
Previous:From: Bruce MomjianDate: 2006-01-16 19:54:32
Subject: Re: [HACKERS] message for constraint

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