Re: [HACKERS] Counting bool flags in a complex query - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Counting bool flags in a complex query
Date
Msg-id 6419.932051230@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Counting bool flags in a complex query  (Michael Richards <miker@scifair.acadiau.ca>)
Responses Re: [HACKERS] Counting bool flags in a complex query
List pgsql-hackers
Michael Richards <miker@scifair.acadiau.ca> writes:
> I'm not sure this is correct, but I think I see a bug of some sort...

> SELECT folderid,foldername,count(*),sum(contentlength),sum(case when
> flagnew = TRUE then 1 else 0 end) FROM usermail,folders WHERE
> usermail.loginid='michael' and folders.loginid=usermail.loginid AND
> usermail.folder = folders.folderid GROUP BY folderid,foldername UNION
> SELECT folderid,foldername,0,0,0 FROM folders WHERE loginid='michael' AND
> NOT EXISTS (SELECT folder FROM usermail WHERE loginid='michael' AND
> folder=folderid) ;
> ERROR:  _finalize_primnode: can't handle node 723

I committed a fix last night; it will be in 6.5.1.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] MAX Query length
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Updated TODO list