Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id A77D89FA26D for ; Mon, 13 Nov 2006 04:48:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 14687-09 for ; Mon, 13 Nov 2006 04:48:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 738279FA265 for ; Mon, 13 Nov 2006 04:48:16 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id A0E70308E2; Mon, 13 Nov 2006 09:48:09 +0100 (MET) From: Stijn Vanroye X-Newsgroups: pgsql.interfaces.odbc Subject: Re: Curious Join issue causing an E_FAIL error (with odbc Date: Mon, 13 Nov 2006 09:42:44 +0100 Organization: Easy to Work Lines: 56 Message-ID: References: <4557F916.1040306@tpf.co.jp> Reply-To: s.vanroye@easytowork.nl Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) In-Reply-To: <4557F916.1040306@tpf.co.jp> To: pgsql-odbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/36 X-Sequence-Number: 8418 Tom Lane schreef: > Well, that could be a driver bug, but you'll need to put together a > self-contained test case if you want anyone to look very hard for it. Tom, what is desirable for the people on the list in terms of a self-containted test case? Any specific requirements conscerning the set-up or output of the test case? Hiroshi Inoue schreef: > Could you show me the whole code ? This is not a query I wrote, so I haven't looked into why everyting is as it is. In the select are some commented lines. That's the interesting region, as well as the related left joins. I can't post all the table definitions, but if you have a question about a field type or such, just ask. select dbu_field.field_id, dbu_field.fieldname, dbu_field.length, dbu_field."precision", dbu_field.lookupclass_id, dbu_field.lookupkeyfield_id, dbu_field.lookupvaluefield_id, dbu_field.agtype_id, dbu_field.sql_filter, dbu_field.sql_code, lookupobject.classname as lookupobject, lookuptable.tablename as lookuptable, --original line --lookuptable.table_id as lookuptable_id, --new line lookupobject.table_id as lookuptable_id, lookupkeyfield.fieldname as lookupkeyfield, lookupvaluefield.fieldname as lookupvaluefield, agtype.description as agtype from dbu_field left join dbu_class as lookupobject on (dbu_field.lookupclass_id=lookupobject.class_id) left join dbu_table as lookuptable on (lookupobject.table_id=lookuptable.table_id) left join dbu_field as lookupkeyfield on (lookupkeyfield.field_id=dbu_field.lookupkeyfield_id) left join dbu_field as lookupvaluefield on (lookupvaluefield.field_id=dbu_field.lookupvaluefield_id) left join dbu_agtype as agtype on (agtype.agtype_id=dbu_field.agtype_id) where dbu_field.class_id=123 order by dbu_field.fieldorder; Regards, Stijn.