470,647 Members | 1,056 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

"on insert" rules happen before the insert?

The postgresql documentation claims that "on insert" rules are executed
after the insert. This is not happening for me. I have a rule that is being
executed even though the insert should have failed due to a foreign key check.

The rule does an insert that is failing, and the whole insert fails. So in
this case it's not a huge problem. But I get a completely useless error
message, and as far as I can tell there is no way to determine exactly what
caused the failure (except for the fact that I happen to know what rule
can cause that error).

I'd like the person inserting a row that violates the foreign key check to
get a useful error message.

Is this a documentation bug? How can I get the desired behavior?
Jul 19 '05 #1
0 1611

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by newbie_mw | last post: by
1 post views Thread by newbie_mw | last post: by
2 posts views Thread by EricRobineau | last post: by
4 posts views Thread by hao | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.