Selecting from a Subquery Fails - Mailing list pgsql-bugs

From Francesco Pari
Subject Selecting from a Subquery Fails
Date
Msg-id 497A088D.7090906@cidimu.it
Whole thread Raw
Responses Re: Selecting from a Subquery Fails
List pgsql-bugs
Hello, i have this big isuue:


i have 2 table referenced by this columns
codiceregistrazione=riferimentoesame;


select tipoesame,count(*) from righeaccettazione,registrazione where
codiceregistrazione=riferimentoesame and validita='VALIDO' and
dataesame  between timestamp '2008-01-01 00:00:00' and '2008-12-31
23:58:59' and eseguitonellasegreteria=1 and ticket <> 2 and
repartoprovenienza=81   group by tipoesame order by tipoesame;


this query works fine (4 seconds to run as it is a large data set) and
produces 245 rows of values in 2 columns


if i try


select * from (

select tipoesame,count(*) as tot from righeaccettazione,registrazione
where codiceregistrazione=riferimentoesame and validita='VALIDO' and
dataesame  between timestamp '2008-01-01 00:00:00' and '2008-12-31
23:58:59' and eseguitonellasegreteria=1 and ticket <> 2 and
repartoprovenienza=81   group by tipoesame order by tipoesame)

as ciao where ciao.tipoesame=615 ;


The query Hangs ....

can this be a bug or a misconfiguration?

thanks in advance

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #4626: postgresql recovery problem
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: Selecting from a Subquery Fails