On Sun, 26 Sep 2004, Stephan Szabo wrote:
> What I'm saying is that, constraints are checked at end of statement. In
> current releases (8.0b2 included I believe but not 8.0b3) functions are
> considered part of the statement that called them, so the constraints are
> check at the end of the full outer statement that called the function.
> 8.0b3 should change this so that the inner statements are considered
> separately. In addition, referential actions are currently (but may not be
And in current sources, functions 2 and 3 error with foreign key
violations rather than unique constraint violations. If the constraint
was deferred you'd still get the unique violations, but we're still
looking to see which error is correct in that case.