I have a problem with a subselect:
Following two Statements are working fine:

a)
select * from
(
select *
from guesses gue, matches mat
where mat.mat_id = gue.mat_id
and act_id = 1
) as foo

b)
select *
from guesses gue, matches mat
where mat.mat_id = gue.mat_id
and date(mat.starttime) = '14.11.2003'

this Statement ends with an error:

select * from
(
select *
from guesses gue, matches mat
where mat.mat_id = gue.mat_id
and date(mat.starttime) = '14.11.2003'
) as foo

ERROR: current transaction is aborted, queries ignored until end of transaction block

any hints?