Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Miroslav ulc wrote:
>> I just verified that the problem is in pg 8.2.5 too.
> Can you show us the table definitions?
We need a *complete* test case, ie, a SQL script to provoke the error
starting from an empty database.
regards, tom lane