X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8B7E852943 for ; Tue, 7 Jun 2005 05:59:03 -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 75854-04 for ; Tue, 7 Jun 2005 08:58:57 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id 0DA485283A for ; Tue, 7 Jun 2005 05:58:54 -0300 (ADT) Received: (qmail-ldap/ctrl 97844 invoked from network); 7 Jun 2005 08:58:54 -0000 Received: from unknown (HELO io.sonorys.at) ([213.235.243.42]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with SMTP for ; 7 Jun 2005 08:58:54 -0000 Received: from neptun.sonorys.at (neptun.sonorys.at [172.24.1.17]) by io.sonorys.at (8.11.7+Sun/8.11.7) with ESMTP id j578wtG22389 for ; Tue, 7 Jun 2005 10:58:55 +0200 (MEST) Received: by neptun.sonorys.at with Internet Mail Service (5.5.2653.19) id ; Tue, 7 Jun 2005 10:58:55 +0200 Message-ID: From: =?UTF-8?B?S8OWUEZFUkwgUm9iZXJ0?= To: pgsql-sql@postgresql.org Subject: Re: SQL equivalent to nested loop Date: Tue, 7 Jun 2005 10:58:52 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/102 X-Sequence-Number: 21703 Instead of tablenames just use functions (tablefunctions) like my example select a."Id", a."Code" from "GetLanguages"() a, "GetLanguages"() b "2","en" "2","en" "1","de" "1","de" |-----Original Message----- |From: Markus Bertheau [mailto:twanger@bluetwanger.de] |Sent: Dienstag, 07. Juni 2005 01:17 |To: K=C3=96PFERL Robert |Cc: pgsql-sql@postgresql.org |Subject: RE: [SQL] SQL equivalent to nested loop | | |Dnia 06-06-2005, pon o godzinie 20:08 +0200, K=C3=96PFERL Robert = napisa=C5=82(a): |> This is basicly a Join, a cross table |>=20 |> i.e. |>=20 |> select b.w from table a, table b where ... | |You'd hope that. The problem is that you don't have the tables and |afterwards specify the join condition, but in specifying the tables |(=3Dcalling the function) you have the join condition already. I can't |figure out the right syntax. What are you proposing? | |SELECT * from f(4, 'foo') as b, f(b.int, 'bar')? | |oocms=3D# select * from object_get_list_of_reference_property(311, |'Themen') as b, object_get_list_of_reference_property(b.object_id, |'Objekte'); |ERROR: ?????????????? ????????? ?? |FROM ?? ????? ????????? ?? ?????? ????????? ?? ??? ?? ?????? ??????? | |I can't get an english error message atm :/, but that doesn't work. | |Markus | |--=20 |Markus Bertheau |