Well I destroyed the database and recreated it, and the problem didn't
happen any more. So unfortunately I can't reproduce it now.
I can tell you that the "approved" field that was causing the problem
was added with an ALTER TABLE ADD COLUMN statement. That's the most
"unusual" thing about the situation. Maybe I'll just have to put it down
to an aberation :-()
Tom Lane wrote:
>
> Chris Bitmead <chris.bitmead@bigfoot.com> writes:
> > SELECT story.approved, story.oid FROM story, webuser, category* WHERE
> > story.webuser = webuser.oid AND story.category = category.oid and
> > approved;
> > [ fails to find tuples it should find ]
>
> Youch. I could not duplicate that here on a toy example, which may
> mean there is a recently-fixed bug, or it may just mean that there
> are additional conditions required to trigger the bug.
>
> What does EXPLAIN say about the plans used for the two queries?
>
> regards, tom lane