Skip site navigation (1) Skip section navigation (2)

Undesired decimal truncation with psqlodbc version 08.04.0100

From: Marco Cassiano <mcassiano(dot)job(at)gmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Undesired decimal truncation with psqlodbc version 08.04.0100
Date: 2009-11-16 13:49:41
Message-ID: 4defa9840911160549h22eb958cx95dc8ac3d631f8c0@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-odbc
Hello everybody,

during this weekend we upgraded our Postgres database from version 8.3.8 to
version 8.4.1.
We also updated the odbc driver from version 08.03.0400 to version
08.04.0100.
With this new version though, we observe an unwanted decimal truncation as
you can see in the following example.

I would need your help to understand the reason of this different, undesired
behavior and how to fix it.

Thank you

Marco

I attached the output from the same query on the same database made with the
two drivers version:


 >>>>> With version 08.03.0400 (Correct decimal handling, see column
"co_perc_magg_matrice", first row):

SQL> select * from anamat.collezioni;
+-----+---------------------+-----------------+---------------------+--------------+---------+
| coll| co_descr            | co_coll_numerica| co_perc_magg_matrice|
co_descr_abbr| cond_pag|
+-----+---------------------+-----------------+---------------------+--------------+---------+
| 1   | Descr. non disponib.| 10              | 1.200               |
PennyPull    | RB10    |
| 2   | Descr. non disponib.| 20              | 0.000               |
PennyBlack   |         |
| 3   | Descr. non disponib.| 30              | 0.000               |
NewPenny     |         |
| 4   | Descr. non disponib.| 40              | 0.000               |
Classic      | RB09    |
| 5   | Descr. non disponib.| 50              | 0.000               | PB
Plus      |         |
| 6   | Descr. non disponib.| 60              | 0.000               |
Active       |         |
| 7   | Descr. non disponib.| 70              | 0.000               | Jeans
& B.   |         |
| 8   | Descr. non disponib.| 96              | 0.000               |
Trend        |         |
| 9   | Descr. non disponib.| 90              | 0.000               | F.
Natale    |         |
| A   | Descr. non disponib.| 48              | 0.000
|              | RB09    |
| B   | Descr. non disponib.| 31              | 0.000               | Flash
NP S   | RB09    |
| C   | Descr. non disponib.| 32              | 0.000               | Flash
NP C   | RB09    |
| E   | Descr. non disponib.| 11              | 0.000               |
Ins.P.Pull   |         |
| F   | Descr. non disponib.| 21              | 0.000               | Flash
PB J   | RB09    |
| G   | Descr. non disponib.| 22              | 0.000               | Flash
PB G   | RB09    |
| H   | Descr. non disponib.| 35              | 0.000               |
Ins.N.Penn   |         |
| I   | Descr. non disponib.| 23              | 0.000               | F. PB
Ant.   | RB09    |
| K   | Descr. non disponib.| 28              | 0.000               |
N.D.         |         |
| L   | Descr. non disponib.| 84              | 0.000               |
FL           |         |
| M   | Descr. non disponib.| 24              | 0.000               | Flash
PB M   | RB09    |
| N   | Descr. non disponib.| 85              | 0.000               | Ins.
NP      | RB09    |
| O   | Descr. non disponib.| 26              | 0.000               | Saldi
I. P   |         |
| P   | Descr. non disponib.| 98              | 0.000               |
Pubblicit.   |         |
| R   | Descr. non disponib.| 99              | 0.000               |
Prototipi    |         |
| S   | Descr. non disponib.| 25              | 0.000               | Ins.
PB Ac   |         |
| T   | Descr. non disponib.| 45              | 0.000               | Fl.
abiti    |         |
| U   | Descr. non disponib.| 46              | 0.000               |
Chemises     |         |
| V   | Descr. non disponib.| 47              | 0.000               | Max&Co
Acc   |         |
| W   | B2B by default      | 91              | 0.000               | B2B by
def   |         |
| X   | Descr. non disponib.| 61              | 0.000               | Ins.
MaxCo   |         |
| Y   | Descr. non disponib.| 27              | 0.000               | Idee
reg.    |         |
| Z   | Descr. non disponib.| 49              | 0.000               |
DD           |         |
+-----+---------------------+-----------------+---------------------+--------------+---------+
SQLRowCount returns 32
32 rows fetched

>>>>> With version 08.04.0100 (wrong decimal truncation):

SQL> select * from anamat.collezioni;
+-----+---------------------+-----------------+---------------------+--------------+---------+
| coll| co_descr            | co_coll_numerica| co_perc_magg_matrice|
co_descr_abbr| cond_pag|
+-----+---------------------+-----------------+---------------------+--------------+---------+
| 1   | Descr. non disponib.| 10              | 1                   |
PennyPull    | RB10    |
| 2   | Descr. non disponib.| 20              | 0                   |
PennyBlack   |         |
| 3   | Descr. non disponib.| 30              | 0                   |
NewPenny     |         |
| 4   | Descr. non disponib.| 40              | 0                   |
Classic      | RB09    |
| 5   | Descr. non disponib.| 50              | 0                   | PB
Plus      |         |
| 6   | Descr. non disponib.| 60              | 0                   |
Active       |         |
| 7   | Descr. non disponib.| 70              | 0                   | Jeans
& B.   |         |
| 8   | Descr. non disponib.| 96              | 0                   |
Trend        |         |
| 9   | Descr. non disponib.| 90              | 0                   | F.
Natale    |         |
| A   | Descr. non disponib.| 48              | 0
|              | RB09    |
| B   | Descr. non disponib.| 31              | 0                   | Flash
NP S   | RB09    |
| C   | Descr. non disponib.| 32              | 0                   | Flash
NP C   | RB09    |
| E   | Descr. non disponib.| 11              | 0                   |
Ins.P.Pull   |         |
| F   | Descr. non disponib.| 21              | 0                   | Flash
PB J   | RB09    |
| G   | Descr. non disponib.| 22              | 0                   | Flash
PB G   | RB09    |
| H   | Descr. non disponib.| 35              | 0                   |
Ins.N.Penn   |         |
| I   | Descr. non disponib.| 23              | 0                   | F. PB
Ant.   | RB09    |
| K   | Descr. non disponib.| 28              | 0                   |
N.D.         |         |
| L   | Descr. non disponib.| 84              | 0                   |
FL           |         |
| M   | Descr. non disponib.| 24              | 0                   | Flash
PB M   | RB09    |
| N   | Descr. non disponib.| 85              | 0                   | Ins.
NP      | RB09    |
| O   | Descr. non disponib.| 26              | 0                   | Saldi
I. P   |         |
| P   | Descr. non disponib.| 98              | 0                   |
Pubblicit.   |         |
| R   | Descr. non disponib.| 99              | 0                   |
Prototipi    |         |
| S   | Descr. non disponib.| 25              | 0                   | Ins.
PB Ac   |         |
| T   | Descr. non disponib.| 45              | 0                   | Fl.
abiti    |         |
| U   | Descr. non disponib.| 46              | 0                   |
Chemises     |         |
| V   | Descr. non disponib.| 47              | 0                   | Max&Co
Acc   |         |
| W   | B2B by default      | 91              | 0                   | B2B by
def   |         |
| X   | Descr. non disponib.| 61              | 0                   | Ins.
MaxCo   |         |
| Y   | Descr. non disponib.| 27              | 0                   | Idee
reg.    |         |
| Z   | Descr. non disponib.| 49              | 0                   |
DD           |         |
+-----+---------------------+-----------------+---------------------+--------------+---------+
SQLRowCount returns 32
32 rows fetched

Responses

pgsql-odbc by date

Next:From: Maria CianciDate: 2009-11-16 16:26:10
Subject: Postgres issues "Not enough storage is available to complete this operation" exception
Previous:From: Craig RingerDate: 2009-11-16 07:32:48
Subject: Re: Table creation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group