2007/8/11, Stephan Szabo <sszabo@megazone.bigpanda.com>:
> On Sat, 11 Aug 2007, Pavel Stehule wrote:
>
> > Hello
> >
> > I found strange postgresql's behave. Can somebody explain it?
>
> There's a bug since it should work for any number, but we've likely missed
> something. I'm not sure why 2 references work, as I'd expect it to stop
> working after 1 with the likely causes, but one of the constraint checks
> is happening before the row is finished being updated.
>
> I don't think it'll help for this case (since it revolved around multiple
> tables), but could you try the patch from
> http://archives.postgresql.org/pgsql-bugs/2007-05/msg00177.php
> to see if it helps this case?
>
This patch doesn't help. I'll report it as bug.
Regards
Pavel Stehule