pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Brad Wilson <brad.wilson@mnetcorporation.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Possible bug with psqlodbc driver
Date: Mon, 03 Nov 2003 10:23:16 +0900
Message-ID: <3FA5AE04.6B120BA1@tpf.co.jp> (raw)
References: <10E7ECBF04FBE344BE0C12C02D9CAFC61C8E58@mnet01.mnet.local>

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/



view thread (2+ messages)

Message-ID: <3FA5AE04.6B120BA1@tpf.co.jp>
Permalink:  ../3FA5AE04.6B120BA1@tpf.co.jp/
Also on:    postgresql.org/message-id/3FA5AE04.6B120BA1@tpf.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: Inoue@tpf.co.jp, brad.wilson@mnetcorporation.com
  Subject: Re: Possible bug with psqlodbc driver
  In-Reply-To: <3FA5AE04.6B120BA1@tpf.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox