Re: [BUGS] BUG #3729: Query doesn't return the right answer

2007-11-08 Thread David Fetter
On Thu, Nov 08, 2007 at 11:23:39AM +, Andrius Glozeckas wrote: > > The following bug has been logged online: > > Bug reference: 3729 > Logged by: Andrius Glozeckas > Email address: [EMAIL PROTECTED] > PostgreSQL version: 8.2.5 > Operating system: Linux Fedora 7 > Descript

Re: [BUGS] BUG #3729: Query doesn't return the right answer

2007-11-08 Thread Alvaro Herrera
Andrius Glozeckas wrote: > I have a parent_type_id linking to group_type_id on the same table > (group_type). I am trying to get the groups with certain parent_type_id (be > it null or 17) and the number of their children in the same query: > > SELECT g1.*, COUNT(g2.*) > FROM group_type g1 LEFT J

Re: [BUGS] BUG #3729: Query doesn't return the right answer

2007-11-08 Thread Julius Stroffek
Andrius, see the explanation about that at http://www.postgresql.org/docs/8.3/static/functions-comparison.html for more details. Cheers Julo Heikki Linnakangas wrote: Andrius Glozeckas wrote: I have a parent_type_id linking to group_type_id on the same table (group_type). I am trying to

Re: [BUGS] BUG #3729: Query doesn't return the right answer

2007-11-08 Thread Heikki Linnakangas
Andrius Glozeckas wrote: I have a parent_type_id linking to group_type_id on the same table (group_type). I am trying to get the groups with certain parent_type_id (be it null or 17) and the number of their children in the same query: SELECT g1.*, COUNT(g2.*) FROM group_type g1 LEFT JOIN group_

[BUGS] BUG #3729: Query doesn't return the right answer

2007-11-08 Thread Andrius Glozeckas
The following bug has been logged online: Bug reference: 3729 Logged by: Andrius Glozeckas Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.5 Operating system: Linux Fedora 7 Description:Query doesn't return the right answer Details: I have a parent_type_id