From: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | Brad Wilson <brad(dot)wilson(at)mnetcorporation(dot)com> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: Possible bug with psqlodbc driver |
Date: | 2003-11-03 01:23:16 |
Message-ID: | 3FA5AE04.6B120BA1@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
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/
From | Date | Subject | |
---|---|---|---|
Next Message | Rajiv Malhotra | 2003-11-05 08:49:08 | using Version-1 style coding how to access varchar arrays from C function |
Previous Message | Jeroen T. Vermeulen | 2003-10-31 18:43:11 | libpqxx 2.0 released |