X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 521A3D1CA94 for ; Mon, 3 Nov 2003 01:22:07 +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 53418-02 for ; Sun, 2 Nov 2003 21:21:38 -0400 (AST) Received: from sd.tpf.co.jp (unknown [210.161.239.34]) by svr1.postgresql.org (Postfix) with SMTP id 90E5AD1B94F for ; Sun, 2 Nov 2003 21:21:26 -0400 (AST) Received: (qmail 5139 invoked from network); 3 Nov 2003 10:21:25 +0900 Received: from unknown (HELO viscomail.tpf.co.jp) (100.0.0.108) by sd2.tpf-fw-c.co.jp with SMTP; 3 Nov 2003 10:21:25 +0900 Received: from tpf.co.jp ([126.0.1.67]) by viscomail.tpf.co.jp (8.8.8+Sun/8.8.8) with ESMTP id KAA09234; Mon, 3 Nov 2003 10:21:24 +0900 (JST) Message-ID: <3FA5AE04.6B120BA1@tpf.co.jp> Date: Mon, 03 Nov 2003 10:23:16 +0900 From: Hiroshi Inoue X-Mailer: Mozilla 4.73 [ja] (Windows NT 5.0; U) X-Accept-Language: ja MIME-Version: 1.0 To: Brad Wilson Cc: pgsql-interfaces@postgresql.org Subject: Re: Possible bug with psqlodbc driver References: <10E7ECBF04FBE344BE0C12C02D9CAFC61C8E58@mnet01.mnet.local> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/1 X-Sequence-Number: 4559 Brad Wilson wrote: > > Hello, > > Firstly, software specs: > OS: Windows XP Pro (also occurs on Windows 2000) > psqlodbc: 07_03_0200 (also occurs with the 10 previous versions) > DB: postgresql 7.3 (also occurs with 7.2, not tested on others) > > I am having a problem when using the "CASE" function over ODBC within a > select statement. For example, > SELECT a.apples, > a.bananas, > CASE a.others > WHEN 'orange' THEN 'citrus' ELSE 'non citrus' > END > FROM fruits a; > > This will result in about 10 retries (as per the ODBC commlog file), and > then the final results will contain valid data in the 'apples' and > 'bananas' columns, but no data (empty fields) in the 'case' column. > > Interestingly, if I modify the CASE function to return integers rather > than strings, then it will work. Eg, > CASE a.others > WHEN 'orange' THEN 1 ELSE 2 > END > Will work and return the expected results. > > Addendum: Some further testing has shown that statements such as the > following will also fail with similar errors: > SELECT substring (a.apples from 1 for 3) from fruits a; > > Below is a snippet of the commlog file showing the final two retries of > a similar SELECT statement using CASE: > > If you require any further information, please don't hesitate to ask. Could you send me the Mylog debug output ? regards, Hiroshi Inoue http://www.geocities.jp/inocchichichi/psqlodbc/