X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5108CD1B50B for ; Tue, 11 Nov 2003 16:16:09 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 74007-02 for ; Tue, 11 Nov 2003 12:15:38 -0400 (AST) Received: from rambutan.pingpong.net (81.milagro.bahnhof.net [195.178.168.81]) by svr1.postgresql.org (Postfix) with ESMTP id A61A3D1B4ED for ; Tue, 11 Nov 2003 12:15:37 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by rambutan.pingpong.net (8.12.9p2/8.12.9) with ESMTP id hABGFLRY056098; Tue, 11 Nov 2003 17:15:21 +0100 (CET) (envelope-from girgen@pingpong.net) Date: Tue, 11 Nov 2003 17:15:21 +0100 From: Palle Girgensohn To: Tom Lane Cc: pgsql-sql@postgresql.org Subject: Re: curly braces to group outer joins in queries from Message-ID: <40060000.1068567321@rambutan.pingpong.net> In-Reply-To: <111.1068561592@sss.pgh.pa.us> References: <24750000.1068552259@rambutan.pingpong.net> <111.1068561592@sss.pgh.pa.us> X-Mailer: Mulberry/3.0.3 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/119 X-Sequence-Number: 15934 What about the `OJ'? FROM ( OJ table alias left join table2 alias2 ) OJ seems plain wrong, right? Here's their code snippet (from oo_1.1_src/dbaccess/source/ui/querydesign/QueryDesignView.cxx): if(aJoin.getLength()) { ::rtl::OUString aStr = ::rtl::OUString::createFromAscii("{ OJ "); aStr += aJoin; aStr += ::rtl::OUString::createFromAscii(" },"); aTableListStr += aStr; } You mean simple parathesis, no `OJ' would be OK? like: @@ -1141,9 +1141,9 @@ if(aJoin.getLength()) { - ::rtl::OUString aStr = ::rtl::OUString::createFromAscii("{ OJ "); + ::rtl::OUString aStr = ::rtl::OUString::createFromAscii("( "); aStr += aJoin; - aStr += ::rtl::OUString::createFromAscii(" },"); + aStr += ::rtl::OUString::createFromAscii(" ),"); aTableListStr += aStr; } Thanks for the prompt reply, as usual! Regards, Palle --On tisdag, november 11, 2003 09.39.52 -0500 Tom Lane wrote: > Palle Girgensohn writes: >> I just tried using openoffice to create a SQL query, but it failed when >> I tried using left outer joins. The contructed query from OO contains >> curly braces to group things. I've never seen this construct before. > > The SQL standard has never heard of it, either. Parentheses would be > correct here. > > regards, tom lane