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: c2d9e70e0601161244p159f26feld9e9960f3b3a577d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

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

In response to

Responses

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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