Bug report

From: Frank Cusack <fcusack(at)iconnet(dot)net>
To: bugs(at)postgreSQL(dot)org
Subject: Bug report
Date: 1999-09-07 18:14:01
Message-ID: 199909071814.OAA02343@ratbert.iconnet.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

FAQ 1.13 says to fill out the "bug-template" file but I cannot find this
file in the distribution.

This is for:
[PostgreSQL 6.5.1 on sparc-sun-solaris2.6, compiled by gcc egcs-2.91.66]

The bug is that when naming a constraint such as:

...
CONSTRAINT ip_must_be_unique UNIQUE(ip),
...

and attempting to insert a non-unique value, the error is just
"ERROR: Cannot insert a duplicate key into a unique index"
[This is using the perl5 interface.]

But if you do a CHECK constraint like:

...
CONSTRAINT ns_type CHECK (ns_type >= 0 AND ns_type <= 4),
...

the error uses the constraint name in the error message.

I feel the first case should also include the constraint name in the
message, this would be much more useful for error reporting. Perhaps
just add the text "due to CONSTRAINT xxx" to the first case error,
when a named constraint is given.

~f

Browse pgsql-bugs by date

  From Date Subject
Next Message Alois Maier 1999-09-07 18:59:49 Set Transcation Isolation level bug
Previous Message Tom Lane 1999-09-07 13:43:22 Re: [BUGS] like operator bug