X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DED34D8595 for ; Mon, 26 Sep 2005 21:34:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47074-05 for ; Tue, 27 Sep 2005 00:34:09 +0000 (GMT) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.195]) by svr1.postgresql.org (Postfix) with ESMTP id 34E79D97F0 for ; Mon, 26 Sep 2005 21:34:10 -0300 (ADT) Received: by xproxy.gmail.com with SMTP id s14so1251466wxc for ; Mon, 26 Sep 2005 17:34:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=RFrbgazHMN4JCsTp8ichilb281C2usUqEZAtVm/n+xeJhgJ5quBJDZyWlGFNdBM1WH+VdCMLuhX4dF0dHvm+5PrYlSFXUpxFYA0Iy3ZD6cnGy7EqrGu2ythsmey1fCfEFAiXZnxnpy1qRmTc0Sun9cNKDAaM51VzvxyDKsCKmv0= Received: by 10.70.34.10 with SMTP id h10mr2633148wxh; Mon, 26 Sep 2005 17:34:14 -0700 (PDT) Received: by 10.70.87.19 with HTTP; Mon, 26 Sep 2005 17:34:14 -0700 (PDT) Message-ID: <51c8a7be050926173448a22f8@mail.gmail.com> Date: Mon, 26 Sep 2005 20:34:14 -0400 From: jeff sacksteder Reply-To: jeff sacksteder To: pgsql-sql@postgresql.org Subject: how to do 'deep queries'? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17994_10686733.1127781254645" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.79 required=5 tests=[AWL=0.679, HTML_40_50=0.086, HTML_MESSAGE=0.001, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200509/256 X-Sequence-Number: 22803 ------=_Part_17994_10686733.1127781254645 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Is there supported syntax to do 'deep' queries? That is where A relates to = B relates to C, returning fields from each table? This doesn't seem to work. Is there a google-able term for this sort of query? select foo.aaa, bar.bbb, baz.ccc from foo,bar,baz where foo.bar_id =3D bar.id and bar.baz_id =3D baz.id ------=_Part_17994_10686733.1127781254645 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Is there supported syntax to do 'deep' queries? That is where A relates to = B relates to C, returning fields from each table?

This doesn't seem to work. Is there a google-able term for this sort of que= ry?

select
   foo.aaa,
   bar.bbb,
   baz.ccc

from
   foo,bar,baz

where
   foo.bar_id =3D bar.id
and
   bar.baz_id =3D baz.id



------=_Part_17994_10686733.1127781254645--