Received: from mx99.openu.ac.il (arbel.openu.ac.il [147.233.32.4]) by hub.org (8.9.3/8.9.1) with ESMTP id LAA94704 for ; Wed, 28 Apr 1999 11:58:07 -0400 (EDT) (envelope-from herouth@oumail.openu.ac.il) Received: from talmon.openu.ac.il (talmon.openu.ac.il [147.233.32.11]) by mx99.openu.ac.il (Postfix) with ESMTP for id 356B94B79A; Wed, 28 Apr 1999 18:57:51 +0300 (IDT) Received: from [147.233.159.109] (mac-herouth.pc.openu.ac.il) by talmon.openu.ac.il (Netscape Messaging Server 3.54) with ESMTP id AAA2285; Wed, 28 Apr 1999 18:59:58 +0300 X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: <371B2F13.D8B446F6@3skel.com> References: <199904152011.QAA26538@fnur.3skel.com> <371ACCB0.6A437C5@TurnAround.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 28 Apr 1999 18:58:14 +0300 To: Dan Janowski , J_Shevland@TurnAround.com.au, M Simms From: Herouth Maoz Subject: Re: [SQL] OUTER JOINS Cc: pgsql-sql@postgreSQL.org At 16:26 +0300 on 19/04/1999, Dan Janowski wrote: > Thanks for giving it a stab. Looking at the available > operators, > there is no =* or *= ops available. Although I am curious > where it > comes from. To the best of my knowledge, outer joins are not yet supported in PostgreSQL. As far as I recall, you can achieve the same effect with a union. For example, if you have a people table and a pets table, where each person's pet is joined to the owner by the owner's id colum, you'll theoretically do something like: SELECT surname, firstname, pet_name FROM people, pets WHERE id *= owner_id ORDER BY surname, firstname; So instead, you'll have to do something like: SELECT surname, firstname, pet_name FROM people, pets WHERE id = owner_id UNION SELECT surname, firstname, null FROM people WHERE not exist ( SELECT 1 FROM pets WHERE owner_id = id ) ORDER BY surname, firstname; Excuse me if I goofed something syntactically, I don't have time to actually create the tables and test the above. Note, however, that a UNION removes duplicates. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma