Search Postgresql Archives

Re: Constraint violations don't report the value that violates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Russell Smith <mr-russ@xxxxxxxxxx> writes:
> I've would find it useful if check constraints and unique constraints 
> would give a value which is violating the constraint.

> Foreign keys give a value that is failing for the foreign key, is there 
> a reason that other constraints don't do the same thing?

It's not very well-defined, for instance what would you report for

	CHECK some_black_box_function(a, b, c+d)

FKs are constrained by the spec syntax to only involve simple column
values, but this is not the case for either CHECK or unique indexes.

Unique partial indexes would make things even more interesting.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux