Re: [HACKERS] message for constraint - Mailing list pgsql-patches

From Jaime Casanova
Subject Re: [HACKERS] message for constraint
Date
Msg-id c2d9e70e0601161244p159f26feld9e9960f3b3a577d@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] message for constraint  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] message for constraint  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-patches
On 1/16/06, Bruce Momjian <pgman@candle.pha.pa.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

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

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] message for constraint
Next
From: Jaime Casanova
Date:
Subject: Re: [HACKERS] message for constraint