Re: REFERENCES error message complaint, suggestion - Mailing list pgsql-general

From Uwe C. Schroeder
Subject Re: REFERENCES error message complaint, suggestion
Date
Msg-id 200403041327.54909.uwe@oss4u.com
Whole thread Raw
In response to Re: REFERENCES error message complaint, suggestion  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On the other hand I think this might have some value. There are some DB
maintenance GUIs out there that generate the constraint names on their own,
either giving you a more or less visible way to set constraint names, or just
omitting that possibility at all.
I agree that basically one can ask the database what constraint is which (i.e.
using pgadmin3). On the other hand having a clear error in the logfile might
be convenient.

Just a thought.

UC


On Thursday 04 March 2004 07:13 am, Tom Lane wrote:
> "Karl O. Pinc" <kop@meme.com> writes:
> > Does 7.4 do something similar with CHECK constraints?
>
> Nope, just
>
> regression=# create table baz(f1 int check (f1 > 0));
> CREATE TABLE
> regression=# insert into baz values(-1);
> ERROR:  new row for relation "baz" violates check constraint "baz_f1"
> regression=#
>
> I think this is sufficient though, and that database designers ought to
> choose helpful names for constraints.  I should have said something like
>     ... constraint "f1 must be positive" check (f1 > 0)
> if I were concerned about the error message quality.
>
> I didn't care much for your suggestion of showing the constraint
> expression, because to the average non-programmer it would just be
> noise.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

- --
Open Source Solutions 4U, LLC    2570 Fleetwood Drive
Phone:  +1 650 872 2425        San Bruno, CA 94066
Cell:   +1 650 302 2405        United States
Fax:    +1 650 872 2417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAR59ajqGXBvRToM4RAosjAKDG7vLq7M6nXzHi3WfximIlJFvVkgCgyAwk
aKUVIxSFjiKIpJ3juIq7WPE=
=Lk8d
-----END PGP SIGNATURE-----


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Setting up Postgresql on Linux
Next
From: Eric Davies
Date:
Subject: Re: gist index build produces corrupt result on