Re: A crashing query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mario Jorge Nunes Filipe <mjnf(at)uevora(dot)pt>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: A crashing query
Date: 2001-03-28 16:27:48
Message-ID: 18397.985796868@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Mario Jorge Nunes Filipe <mjnf(at)uevora(dot)pt> writes:
> Yestrday a new class was added (this is the only difference from before,
> and since then the following query no longer works:

> select distinct disciplina from lecciona* l where l.docente='$id' and
> l.ano_lectivo<= $ano_lectivo and l.classe in ('lecciona','responsvel')
> and not exists (select 1 from lecciona* l1 where
> l1.disciplina=l.disciplina and l1.docente <> l.docente and
> l1.ano_lectivo <= $ano_lectivo and l1.ano_lectivo > l.ano_lectivo and
> l.classe = l1.classe ) order by disciplina";

Subselects in inherited queries are a tricky area (in fact I just
yesterday fixed a bug in 7.1RC1 in that specific area).

> this system is a 6.4.2,

Try updating to something less ancient --- there are tons of bugs in
6.4.*'s subselect implementation. I'm amazed not that this crashes,
but that it ever worked at all. You really should be on 7.0.3, if
not experimenting with 7.1.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Timothy Morris 2001-03-28 18:43:07 can't read - permissions error (13)
Previous Message Tom Lane 2001-03-28 15:55:37 Re: date_part bug?