X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id C4416310E44 for ; Wed, 2 Jul 2003 10:01:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 31077-02 for ; Wed, 2 Jul 2003 07:01:16 -0300 (ADT) Received: from vadangyal.vnet.hu (mail.vnet.hu [213.163.59.4]) by svr1.postgresql.org (Postfix) with ESMTP id 052E7310E6F for ; Wed, 2 Jul 2003 07:01:13 -0300 (ADT) Received: from compaq (adsl212073.vnet.hu [62.77.212.73]) by mail.vnet.hu (iPlanet Messaging Server 5.1 Patch 1 (built Jun 6 2002)) with ESMTPA id <0HHE000DY6HZC1@mail.vnet.hu> for pgsql-sql@postgresql.org; Wed, 02 Jul 2003 12:01:12 +0200 (CEST) Date: Wed, 02 Jul 2003 12:00:48 +0200 From: =?iso-8859-1?Q?Egy=FCd_Csaba?= Subject: Re: Getting all rows even if not a member of any groups To: pgsql-sql@postgresql.org Reply-To: =?iso-8859-1?Q?Egy=FCd_Csaba?= Message-id: <010601c34080$d8488a10$230a0a0a@compaq> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 X-Mailer: Microsoft Outlook Express 6.00.2720.3000 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT X-Priority: 3 X-MSMail-priority: Normal References: <11362.1056313692@www59.gmx.net> <00bd01c33c9d$1b584e90$230a0a0a@compaq> <20030627140854.GA15269@wolff.to> <00e501c33cb6$f4cc4cd0$230a0a0a@compaq> <20030627151025.GE15269@wolff.to> X-Archive-Number: 200307/42 X-Sequence-Number: 14156 Dear All, thank you for your help, it was really efficient. I'll get by with it now. Thanks. -- Csaba ----- Original Message ----- From: "Bruno Wolff III" To: "Együd Csaba" Cc: Sent: Friday, June 27, 2003 5:10 PM Subject: Re: [SQL] Getting all rows even if not a member of any groups > On Fri, Jun 27, 2003 at 16:18:10 +0200, > Együd Csaba wrote: > > > > This is absolutelly what I want, but I can't understand how it is working. > > Where can I find a descriptive (tale-like, for kids ... :) ) documentation > > about using joins? > > If you look at the documentation for the select command and page down a > bit there is a description of join syntax. Note that in 7.4 using > the explicit join syntax won't force join order. (This really only > affects cross joins and inner joins; left and right joins normally > can't be reordered.) > > You need a left join to pick up products that aren't in any group. > The parenthesis changed the join order so that group names were attached > to group ids before group ids were joined to products. This can have > performance implications. I think that this is probably the faster > way, but the other option would to have been to make the second join > a left join as well. > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 2003. 06. 18.